LimeSeg - a particle active contour method for 3D segmentation

3d-reconstruction
plugin
segmentation
Tags: #<Tag:0x00007fb882d50b78> #<Tag:0x00007fb882d507e0> #<Tag:0x00007fb882d50510>

#1

Hi everybody,

Just want to announce the availability of LimeSeg, a plugin to perform 3D segmentation of objects labelled on their outline:

It’s an active-contour like method. Basically you define an initial shape (typically a sphere) that deforms into the object of interest thanks to the attraction of local image maxima.

If you want to get a rough idea of what’s possible and what are the typical images where it’s working please check the tutorials here:

We’ve tried to make it easy to use by providing simple commands and by integrating them with the standard IJ interface. But… this is the first time people have the occasion to use it without the developers being next to them. “Easy to use” is a relative notion :wink: , and the documentation is partial.

This forum is the perfect place for discussions and feedback, so do not hesitate to use this thread for any remark/suggestion. I’d be more than happy to get feedback and help if possible!

Best,

Nicolas

PS: I received invaluable help and encouragements from many people in this forum… Thank you all! So cool to be part of this amazing image analysis community.

PS2: Quick demo image: https://raw.githubusercontent.com/NicoKiaru/TestImages/master/Vesicles/Vesicles.tif


#2

Hi @NicoKiaru,

That looks really impressive ! So I wanted to try it on some data that I have but couldn’t make it work…

The data I’m trying with is deconvolved stained nucleis. I tried multiple settings but couldn’t really get something I’m happy with so if you could help guide me, that would be great.

So as you can see, the nuclei borders are not found. I tried applying a gaussian filter, thinking that it could be the deconvolution but still no luck…

Do you think that some settings alone would work fine or should I preprocess more the data ?

Thanks a lot :slight_smile:


#3

Hi @lguerard,

Thanks for trying it!

I see you tried multiple settings, but what’s the outcome ? If it keeps being a sphere, that might be because you let the number of optimization steps to 1 (-> it this case try “-1”). But it 's hard to tell from your message.

If you share one of your 3D image (original raw data should be ok I think, cropped if necessary), I can give it a try!

Best,

Nicolas


#4

I either get a sphere (or close to it) or it captures too much background. Is there a way to set that ?

I anyway uploaded the image on Switch Drive.

Thanks for the help :slight_smile:


#5

I get pretty ok results for the overall shape with these parameters:

Is this what you wanted ?

I’m curious to know what you tested to understand the trouble.

Best


#6

Ok so I understood what the mistake was, a stupid thing. I was using “1.57” instead of “1,57” which messed everything… Thanks for the help, it seems to work great now :slight_smile:

I just have a couple of questions about the plugin itself:

  • Is there a way to get RealXYPixelSize and Z_Scale filled automatically using the metadata ? It doesn’t seem to work for me even though I’m using Bioformats and the info is there.
  • I didn’t really get what the difference is between the Surface and the RealSurface, or same thing with volume.

Once again, thanks for the help and sorry for bothering you. :slight_smile:


#7

Localization is evil. I had the same issues with TrackMate when people were using the GUI from PCs localized in France. I don’t even speak about exporting to CSVs…


#8

This is so true. I’m using my computer as a French one (too used to the keyboard and everything) but everytime I remote to another one then I spend a minute wondering what sign I should use. This just happened for Limeseg on a different computer…


#9

Whoa! Indeed I would never have figured this out. This reminds me of Excel translating the names of the functions…

That would be nice! But it’s not implemented now. Added in the “todo” list (https://github.com/NicoKiaru/LimeSeg/issues/3)

Yeah, what’s in the documentation is very succinct. I’ll try to make things clearer with an example:
Let’s say you image a cube of size 10um x 10um x 10um with 0.5um pixel size (xy) and 2um sampling in z. If you properly set Zscale (=2/0.5=4) and RealXYPixelSize (=0.5, if you want to use microns), here’s what should happen:

  • The “physical” surface is 6x10x10 um^2 = 600 um^2 -> 600 is what you expect as RealSurface value.
  • The “physical” volume is 10x10x10 um^3 = 1000 um^3 -> 1000 is what you expect as RealVolume value.

These “real” values are using both the Zscale and RealXYPixelSize parameters.

For the default surface and volume outputs, what’s considered is that the pixel size (so in XY) is 1, and it is taking into account the anisotropy in Z for optimisation and calculation using ZScale parameter. For this example the cube as a side of 10/0.5 = 20 pixels. Here’s what you expect:

  • The default surface is 6x20x20 px^2 = 2400 px^2 -> 2400 is what you expect as Surface value.
  • The default volume is 20x20x20 px^3 = 8000 px^3 -> 8000 is what you expect as Volume value.

Hope that’s understandable!


#10

Hi @NicoKiaru,

just wanted to express my additional congrats to this tool in addition to the like!
I played a little with it on different structures and still need to figure out how to optimize my parameter settings but it is absolutely fantastic :sunglasses:
Looking forward to see how it develops further if changes are intended.

I figures out that in my Fiji installation it did not appear in the alphabetical order under plugins but rather at the end of the list. Just wanted to let you know (since it might be a known behaviour or not possible differently).

Is there also a possibility (or planned for the future) to extract the segmentation result as a binary stack?

Cheers,
Jan


#11

This is a known problem, making SciJava Command plugins being listed separately from IJ1 plugins:


#12

Thanks a lot!

  • Yes that’s always the tricky part for such methods. FYI, apart from parameter tuning, there are a few undocumented workarounds for common problems (putting “fixed” obstacles to avoid leakage, setting a distance offset between maxima and surface).
  • Hopefully the magic search bar appeared!

Not yet. But if this tool is used probably yes! Several options are possible:

  • The “quick and easy one”, that could be implemented with a simple script: getting object vertices and transform them into small cubes into a 3D image -> you get the outline of the segmented object.
  • Cleaner and better on the long term, but which requires much more work at the moment: transfer meshes to Sciview then use voxelization (How to voxelize a .STL file)