Re: Circles?



On Aug 18, 7:24 am, "Robert " <robert.soc...@xxxxxxxxxxxxxxxxxx>
wrote:
Hello all,

I am trying to make some random sized spheres in 3d space.
to test an image processign algorithim.

I would like soemthign that produces a 100*100*100 image
stack, where white correesponds to a ball in 3d space with
back being the background. - obviously the spheres vary in
position and radius as you move through the image stack.

In summary I'd like to take slices through the plot below
and have the circles filled in. (with pixels in the
spheres being on)

Ive got as far as:

[x,y,z] = sphere(5);
figure; hold on;
num_spheres = 10;
for i = 1:num_spheres
    xi(:,:,i) = (50 + x + (20*randn()));
    yi(:,:,i) = (50 + y + (20*randn()));
    zi(:,:,i) = (50 + z + (20*randn()));
    surf(xi(:,:,i), yi(:,:,i), zi(:,:,i));
end
hold off

which works fine to plot and generate the spheres.

the problem comes to create a symthetic image stack from
this data. - Im after slices along the vertical direction
of the plot. - these could then be filled in to create the
circles in each stack. I dont know the logical test to
apply to the x,y,z matricies in order to see if we can
create a solid sphere int he 3d space to then extract to
an image....

 I tried griddatan as well, but got confused when i needed
a volume...

Is there a better way of doing this? - does anyone
actually understand what I want to get to?!

Bob

------------------------------------------------------------
Bob:
After you've created your 3D volume, why don't you just go through the
slices and fill the circles using the imfill() function?

By the way, your spheres are pretty large compared to your volume.
I'm not sure what image processing you're doing but you should be
aware of "stereology" (it has nothing whatsoever to do with
stereoscopy) in case that might be applicable for your situation.
Here's a snippet from
http://en.wikipedia.org/wiki/Stereology
Stereology (from Greek stereos = solid) was originally defined as `the
spatial interpretation of sections'. It is an interdisciplinary field
that is largely concerned with the three-dimensional interpretation of
planar sections of materials or tissues. It provides practical
techniques for extracting quantitative information about a three-
dimensional material from measurements made on two-dimensional planar
sections of the material. See the Examples below. Stereology is an
important and efficient tool in many applications of microscopy (such
as petrography, materials science, and biosciences including
histology, bone and neuroanatomy). Stereology is a developing science
with many important innovations being developed mainly in Europe. New
innovations such as the proportionator continue to make important
improvements in the efficiency of stereological procedures.

Why this is important is because, say you're excluding objects which
touch the border (because you don't have the complete object). Well,
this will preferentially exclude large objects and skew your results
towards the smaller objects. Or say your spheres are all the same
size. Well a section will not get you all the same size circles
because you will be slicing some spheres at the max diameter while
slicing others near the tip. Stereology provides the math to handle
adjusting for these kinds of situations.
Regards,
ImageAnalyst
.



Relevant Pages

  • Re: What would Sam have done?
    ... spheres were transparent. ... Does anyone know when the actual word 'crystal' (or crystalline) was ... Everything else is circles. ... of Fixed Stars. ...
    (rec.arts.books.tolkien)
  • Re: Epistemology 201: The Science of Science
    ... Geodesic lines are great circles. ... imbedded (in higher dimensional space) surface is *not* a straight ... spheres do exist in Euclidean geometry and spherical angles ...
    (sci.cognitive)
  • Re: Epistemology 201: The Science of Science
    ... Geodesic lines are great circles. ... imbedded (in higher dimensional space) surface is *not* a straight ... spheres do exist in Euclidean geometry and spherical angles ...
    (sci.physics)
  • Re: Epistemology 201: The Science of Science
    ... Geodesic lines are great circles. ... imbedded (in higher dimensional space) surface is *not* a straight ... spheres do exist in Euclidean geometry and spherical angles ...
    (sci.math)
  • A kind of fun question.
    ... Suppose we have 2 one-meter spheres of materials: ... contains points of matter, the other of anti-matter. ... "physics" of the 2 spheres are: ...
    (sci.logic)