3D object counter - Trying to color / label objects

Hello all!

Was hoping I could get a bit of help for the 3D image processes in imagej!

I’ve been trying to use the 3D object counter function and played with multiple parameters but keep getting silly results i.e. far too many or too little real results.
The other problem is that I cannot see the objects in the 3D viewer, so it makes it difficult to see what imagej has identified as an object.
Is it possible for imageJ to instead of giving white objects in my example below, to colour in the entire thing it things it is an object or to at least outline them and put a number on it or something?

Example of what I’m working with

Really hope someone can help me with this and will love anyone forever who helps this poor guy out!

Hello @SirSharpest and welcome to the ImageJ forum!

You need to label all the binary objects using Connected Components Labeling.

It would be great if you can upload a sample of your images so other users can give you a hand with the 3D object counter. Also, you might be interested on having a look at the Morphological Segmentation plugin.

1 Like

Hi, thanks for the response :slight_smile:

My images are huge 700mb~ being the smallest and range to 30gb.
They’re ISQ CT scan output images.
More than happy to share if you know of an easy way to do so.

Many thanks!

I see. Can you scale and/or crop them? Then upload an example to Dropbox, Google drive, Mega… :slight_smile:

Thanks for the idea, just been downsizing and grabbing a typical image I have to work with.
It’s a 3D tiff stack. Still 80mb but 10th of what size it was
Can grab it from here Google Drive shared folder

hi @SirSharpest,

Yes, as mentioned by Ignacio, you need first to identify the different objects via a labelling. For visualisation you can use the 3DManager http://imagejdocu.tudor.lu/doku.php?id=plugin:stacks:3d_roi_manager:start with the macro
Displays the objects in 3D viewer with random colors to display each object with a different color. I think there is also such tool with the morphological library.

.
Hope this helps
Best,
Thomas

That’s amazing! Exactly what I was looking for!

Thank you so much.

Will have a go with this when I get into work.

Will this give me a list of data points/centers for example. To improve the accuracy (two yellows near bottom seem to touch) can I do a heavy errorsion get the centers and apply them to the original image?

Glad you like it :slight_smile:, yes you can measure and export a lot of information including centers and list of voxels. Yes to separate touching objects you need a opening (erosion then dilation), not that watershed techniques can help you separate objects two. A split function is incorporated into the 3DManager, check if it is working for your data.

Best,

Thomas

Been trying to play around with it today just to get what you had shown in your image.

Going to reset a lot of my pc soon and hopefully will fix any latent Java issues which may be affecting performance.

Keep freezing up and having to restart ImageJ.

I’ve done the 3D object counter and got some results, but when I load it into the manager it seems to number more objects than what were counted?

And when I try to use the Live ROI or else the 3D viewer from the manager, It freezes completely.

Am I supposed
to use one of the other options first / do I select all of the objects listed when doing so?

So sorry to keep pestering you and so so appreciating all the help thus far!

edit Just tried running this: http://imagejdocu.tudor.lu/lib/exe/fetch.php?media=plugin:stacks:3d_ij_suite:macromanager3d2_colorsviewer3d.ijm but the 3D viewer shows blank at the end. As I say not sure about my Java install being 100% so will try again on fresh system

Okay made some progress with your script!
Starting to look great :slight_smile:

Any idea about them being flat and not occupying the same thickness space as before?

This is the output stack, wasn’t sure why it’s hollowed everything either :S

Dear Nathan,

You data is quite big and so the plugin may take to process live roi or some measurements. I may suggest you to try to set up a protocol on a small crop of your data and then when the macro is ready, run it on the full stack. I know this plugin may have performance issue on big datasets. If you are using Fiji please install Java8 from the update website.

Best,

Thomas

Hi,

I am not sure to fully understand what you did here, it looks like you are using 3DOC to display the objects along with some labels. About the thickness, check the Z calibration in Image/Properties. About the image random you are showing, it looks like the labelled iamge was modified or converted before being used in 3DManager.

Thomas

Ah I was being very stupid with some things. The object counter has been a major issue in this, not the manager.

My other mistake had been that I’d selected the wrong image to use from the object counter’s output.

Apologies!

I think everything is starting to work, thanks again for all your help!

Just to clarify is it the object map output from the 3D object counter which I should be using becauset still gives me very odd shapes when using that macro?

Final update for anyone who stumbles across this… I’m very silly and @ThomasBoudier is amazingly helpful and everything works great!

Have attached a gif of my CT wheat working from this software :slight_smile:

2 Likes

Hi Nathan,

Looks very nice :slight_smile: . Note that for labelling you can also use the 3D segmentation method in 3DManager, I think it may be faster than OC . In OC try not to display number labels as it introduces new pixel and may not help for analysis.

Best,

Thomas

1 Like

Hi,
It seems I’m a bit late to the party as the last post was made in 2017.
This topic is exactly what I was looking for. However, the links don’t seem to work anymore and I cannot find the 3D Manager mentioned.
Can somebody help me out?@ThomasBoudier

Thanks!
Nicole

Hi @HereToLearn,

Unfortunately it seems the website is down and may not be up for some time. I will be happy to answer any questions related to 3DManager.

If you want to install it, you need to use update sites form Fiji update 3D ImageJ Suite and ImageScience.

Best

Thomas

2 Likes

Hi @ThomasBoudier and @iarganda,

I have a segmented image, from a z-stack that I would like to visualise in 3D. I can use 3D object counter to pull out information regarding each object (surface area, volume, etc), but, as the title for this thread, I would like to be able to generate a 3D visualization which would colour code each object (based on size for example) and allow manipulation, rotation, etc (similar to what @SirSharpest posted above).

I have to say I have been struggling, either with MorphoLibJ or with 3D Manager, to go beyond just labelling the objects.

For example, @iarganda, you have suggested on another thread (Color particles in 3D depending on their volume) to do Connected Component Labeling -> Particle Analysis 3D plugin, but I can’t even find this particle analysis plugin. I feel I’m at a very basic level for this…

Can you please, just indicate a workflow that I can follow and try out. Since the image I’m working with is quite large (>100MB) here’s a link to it https://mycore.cnrs.fr/index.php/s/5TFPhSwBPIA8y54

I appreciate any help on this.

Thanks!
Nuno

Dear @NML,

I’m sorry but @dlegland changed the name of the plugin to “Analyze Regions 3D” a while ago. You should find the plugin under Plugins > MorphoLibJ > Analyze > Analyze Regions 3D.

I hope this helps!

3 Likes