Let's say the shape is too complex to split it into simpler parts and solve it analytically.
I can obtain it's longitudinal cross-sectional area by loading the image into an image editor, scaling it appropriately to the point where 1px$^{2}$ = 1mm$^{2}$, then by measuring the number of pixels inside the shape, I can get the approximate area. Here is a simple example of what I mean
Since I know that this value is the result of evaluating this definite integral here: $ A=\int_{a}^{b}r(x)dx$
And that the volume of a solid of revolution obtained by rotating the same shape around the x axis: $V=\pi\int_{a}^{b}\left[r(x)\right]^2dx$
I'm wondering if by some method I can get from one to another?
Thank you in advance.
No, you need more information. For example, consider a semicircle of radius $1$. Then the area is $\frac{\pi}{2}$ and the resulting volume is $\frac{4\pi}{3}$. Now consider a rectangle of height $1$ and width $\frac{\pi}{2}$. Then the area is again $\frac{\pi}{2}$, but the resulting volume is now $\frac{\pi^2}{2}$.