Re: can you easily make "test" data volumes with simple shapes? [message #35917 is a reply to message #35770] |
Tue, 22 July 2003 06:09  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <3f1c92c1$1_3@news.utk.edu>,
"Jeff Nettles" <jnettle1@utk.edu> wrote:
> Hi folks,
>
> I'm working with some CT data of meteorites, and have been measuring shapes
> of objects in the CT volume. The objects are basically spheroids, with
> varying degrees of irregularity, both in surface roughness and sphericity.
>
> I've taken a bunch of random slices through one of the objects, and made
> some measurements of those slices (the slices are supposed to mimic what
> you'd see on a microscope slide). So i have, for example, histograms of the
> area and perimeters of those objects. Now what i'd like to do is to take a
> bunch of random slices through a perfectly spherical object, and slices
> through a very irregular object, and see how the histograms differ.
>
> So what i'd like to do is create a data volume that contains a perfect
> sphere, with brightness values of >1 in the sphere and = 0 outside the
> sphere. Then make a very irregular one. I know i can do this the long and
> hard way by making a series of images of circles with increasing and then
> decreasing diameters, but if there's an easier way i'd sure like to do it
> that way. So if anyone knows of a short cut that gets me around a long day
> of use of either photoshop or illustrator or both, i'd love to hear it. Or
> better still, if anyone has some data like this already and is willing to
> share it, why that'd be perfect!! :D
>
> Thanks so much for your time and hopefully your help,
> Jeff
>
>
You can calculate the histogram of the slices through perfect spheres
analytically. Assuming that you slice through the sphere randomly, the
distance from the center of the sphere is a uniformly-distributed random
variable, say x. From the Pythagorean theorem the radius of the
resulting circular slice is just y = sqrt(r^2 - x^2), where r is the
radius of the sphere. Given a distribution of the sphere sizes, r, you
can find the distribution of the circumferences and areas of the slices.
For the irregular objects, you will have to make some assumptions about
how to make them irregular. A fairly general approach would be to
assume that the radius of the slice as a function of polar angle is
given by a Fourier series, r(theta) = sum over i of [a(i)*cos(theta) +
b(i)*sin(theta)], where a and b are random variables chosen from a
particular distribution (e.g., uniform, etc.). Generate a and b using
RANDOMU (for example), compute the boundary curve using a small
delta-theta, sum the segment lengths to get the perimeter, then compute
the area of the polygon
A = (1/2)*((x1-x2)(y1-y2) + (x2-x3)(y2-y3) + ... + (xn-x1)(yn-y1))
Regards, Ken Bowman
|
|
|