3D Spheres Segmentation

Hi, all!

I’m just new to ImageJ and wanted to segment spheres in a stack of thousands of pictures. The particles are the brighter spots and the background is dark.
Yet the stack looks like distorted spheres, but not perfect spheres… Is there any way to fit spheres into the binary images I’ve got? Or possibly any better way to transform the 3d stack into binary images with perfect 3d spheres?

I’ve tried with LimeSeg but it does not work for my images… I also searched in the forum for a long time but still have no idea how I can deal with sphere segmentation, especially when I have so many pictures… Probably I can try trainable weka and find a plugin which can create max inscribed spheres?

Thanks a lot for your help!!

Hello Vvina

It appears your images did not upload correctly.

There could be a few places where the images would lose there “spherical” shape. Possibly due to the microscopy, or maybe just a misconfiguration.

How many spheres do you need to track/locate? What do you want to measure from the spheres afterwards?

Cheers
Matt

Hi Matt,

thanks for your reply!! You can just right click and open the images. There are like thousands of spheres which I need to segment (since there are over a thousand images in a stack). I wanted to measure the porosity and possibly the size, location of spheres afterwards. (but most importantly the porosity…)

And again, thanks a lot for your help!

Vvina

Hey Vvina

You’re right, I could download the images, they didn’t look like links to me and I just though they were normal text.

They’re not 3D images though? How did you create the binary image?

Cheers
Matt

Hi Matt,

I have 1000 images of the same series. So I think that could be considered as a 3D image? I made the binary by using Trainable Weka, but the problem is the circles in binary image do not perfectly really fit into the circles in the raw data…So the generated 3d diagram is a bit distorted…

Cheers
Vvina

Hello Vvina,
I’m sorry but I right clicked on everything and could not get a download.
Bob

Good morning Vvina

So I think that could be considered as a 3D image?

Not exactly, because in 3D you might have separated or touching spheres where as a time series of 2D projects will appear to be wiggly cylinders in 3D. The 2D projection will suffer from occlusion but there has a been a lot of work in 2D tracking.

So which are you working with, actual 3D movies of spheres or 2D projections?

When you say you created the binary image using the Trainable Weka is this the output after training on the image, or did you manually label this image using the Trainable Weka interface?

With the binary image you provided, youshould be able to get circles out of it pretty well though.

I inverted the lut did a distance transform, and then I did find maxima. Those seeds could be used to find the edges of the circles. So if you wanted to pursue that route I’m sure somebody could help you get the full pipeline together. (The particle detector seems to do a lot of that type of work with circularity etc.)

Can you describe the system your working with a bit? Maybe somebody doing similar work/research would get involved.

Hi Vvina,

Did you do more than simply segmentation using trainable Weka? Somehow the spheres are not ‘simply’ segmented, but indeed the objects are displayed as perfect circles:

image deleted on request of poster (confidentiality)

I wanted to measure the porosity and possibly the size, location of spheres afterwards. (but most importantly the porosity…)

Could you perform segmentation without fitting the objects to a circular shape? → this way you should be able to get the proportion of white vs black pixels and thus porosity for each 2D image of your 3D stack (and thus for the whole 3D data stack in the end).

If you would then separate the circles using watershed and thus have individual spheres, you could obtain information for all objects via the 3B Objects Counter (https://imagej.net/3D_Objects_Counter).

I see while writing this post there have been a few replies already :slight_smile: Some are asking what the data is: to me it looks like a µCT of beads most likely hold in some cylindrical sample holder?

Danielle

Odinsbane
Thank you very much for the assist. I think my only problem is old age and unfamiliar with this new-fangeled technology. Again thanks!
Bob

Hello Vvina,
Good day to you. After looking over the images it seems as though the plug in BoneJ may be of great help. It’s available in the plug ins site and is pretty self explainatory.
Please keep all of us interested updated as to your progress.
Bob

O.K. Vvina, Now for the stupid question. Do you wish the porosity THRU the spherical area or thru the sphere itself?
BoneJ has porosity settings. Sorry to bother.

Bob

Hi Bob,

thanks for your suggestion! I’ll play with the plugin and update the results later! I wanted to have images of exact spheres out of the stack of images first and then measure the porosity through the spherical area. But both are important to me.

Vvina

Hi Danielle,

you are right. It is a µCT of beads held in cylindrical sample holder. I need to force the final binary images into circular shape, thus making all particles in the resulting 3D image spheres. So the binary image is obtained after I forced all shapes into circles (max. inscribed circles). But result is unpleasing, as the 3d image does not look good. Both porosity and the spherical shape are important to me. The most crucial problem with my images is that I cannot make the whole stack into a perfect spheres-filled image…

Cheers
Vvina

Hi Matt,

thanks for your help! Just as Danielle has said, it is a µCT of beads held in a cylindrical sample holder. And the image is just a stack of 2D images like what I have posted. I wanted to make them into a final 3D image filled with spherical particles and then measure the porosity. The binary image is the result after trainable weka and max inscribed circles. It looks good enough from the 2D perception, but when it comes to generate a 3D image as a whole, the spheres are distorted. What I want the most is to generate a 3D image with spherical particles. Till now I have no idea on what to do with 3D segmentation…

Cheers,
Vvina

Hi Bob,

I just tried out the BoneJ plugin. But it seems that it did not work in my case… But still thanks for your suggestion!

Cheers
Vvina

Do you have a stack of 2D slices that compose a 3D image? I am not sure how to help you with the 3D distortion without seeing the 3D image stack to know what type of distortion it is occuring.

Hi Matt

I just made a shared OneDrive link: https://1drv.ms/f/s!AhOnvAzyIm1WiXT1OY4gzjLeCYYv
This is the binary data that I have made.
And more raw data could be found in the following link:
https://1drv.ms/f/s!AhOnvAzyIm1WjA9YH12ru_Dh2iWe

Thanks a lot

Vvina

Right on. What is the relationship between slices? What is the spacing between z slices? If I import the stack it says 2um pixel voxels.

Is the distortion you’re talking about where one sphere bleeds into another sphere leaving you with a tube that has two bulges?

Hi Danielle,

I’ve just tried out the 3D object counter several times. Yet it can only identify 7 objects out of my images… Do you have any idea how that has happened?

Thanks a lot for your help!

Vvina

Hi Matt,

thanks for your prompt reply! The distortion appears when I try to view binary stack in 3D form by using 3d viewer. The particles are not perfect spheres when looked that way. I want to generate a 3D image of perfect spheres. They can be touching one another, but not intruding into other’s space.
As for the z spacing, I have yet no info about that (I think I need to try out as well). I’ll try to ask for that information!

And thanks a lot!

Vvina