Grow from seeds function produces wrong data

This image shows the segmentations I have drawn.

However, after I grow from seeds, it gives me something completely wrong. What am I doing wrong here?

Are you trying to segment the lungs with 3D Slicer´s grow from seeds effect?
This YouTube video may help.

However, this is a time-consuming process. Alternatively, you could use modules from the Chest Imaging Platform, LungCTAnalyzer, or the TotalSegmentator extension for that purpose.

2 Likes

The segmentation looks correct for these inputs. It seems that you did not add seeds into regions that you are not interested in, therefore your other segments leaked into the unclaimed area. You can fix that by adding an “other” segment and use it to draw scribbles in all areas that you want to be ignored. Once the segmentation is completed, you can delete this segment. For segmenting textureless structures (that are typical in phantoms like yours and sometimes appear in clinical images in regions filled with fluid or air) you may want to increase Seed locality value a little bit (0.1-0.5 may be enough) to reduce leaking.

Since your phantom looks completely noise-free (is it an in silico phantom - a computationally generated image?), probably the simplest is to segment it using Threshold effect.

I am trying to use the totalSegmentator extension, but I get reproduceable data that is, for lack of a better word, wonky.

Can you help me out with this? Thanks

We can probably help but need the dataset somehow. What is it exactly do you need to segment?

The dataset looks so unrealistic that I’m not surprised that most tools fails to deal with it. There is no natural texture or noise in the image. There are gaps (e.g., below the skin). It is not even clear what imaging modelity it is supposed to be (looks more like an MRI, but what kind?). The orientation is incorrect (rotated by 90 degrees in axial view, sagittal/coronal are mixed up). Probably the physical size is off, too (you can check by making some measurements in Markups module).

Is it some in silico phantom? What software have you created it with? What is your overall goal?

Okay, I’ll describe my project here.

This model is taken from the virtual family project. This one is duke. My goal is to take the model from sim4life and make it into a CAD model (.stl, .step, etc.).

How I went about this was extracting the sim4life data into matlab as sigma, rho, and epsilon variables. In Matlab, I converted it into a matrix and nii file. (I also corrected the orientation of the model by transposing and flipping the matrix). With the nii file, I took it into 3d slicer to try to segment it and export as a CAD viewable file. I believe it is an MRI scan.

The simplest way to create meshes from such data set is to save it as a labelmap image (each value of the matrix is an integer value that specifies what segment that voxel belongs to). You can then load the image file as a segmentation (by choosing “Segmentation” in “Add data” window) and click “Show 3D” to generate meshes.

If you are interested in free, open solutions, you can use Slicer (and various automatic segmentation tools, such as TotalSegmentator extension) for creating patient models and FEBio for biomechanical simulation (or revive the Slicer-based Bender project for posing patient models).

Thanks for you help!

How would I go about creating this labelmap image? Is it a process that I do in matlab? Is there a website documenting this process?

Yes, you do it in Matlab. All you need to do is to use an integer value type.

Ok, so I take the original image matrix and change its type to integer? Wouldn’t this truncate many values and break the image?

Make sure voxels corresponding to a segment all have the same value. Truncation is no problem, as long as voxel of different structures don’t get assigned to the same value.

It worked well, thank you very much. However, the skin layer seems to be inconsistent. Sometimes muscle shows through or bones. Is this a model issue or can this be fixed in software?

The “skin” barely exists, it looks like some disconnected single-voxel boundary that is just thrown on top of the other structures. Maybe you can try to hide all the other segments, in masking settings allow overlap (to prevent the “skin” from overwriting internal structures), then make the skin boundary thicker using Margin effect, and then fill what is inside the skin, using Islands effect.