Improving manual segmentation of MRI images using automatic methods

Operating system: Windows 10 Education (latest)
Slicer version: 4.10.0

Hello everyone!

I would like to know if there are any ways to improve manual segmentation of objects done using (paintbrush, draw, etc…) to get the most accurate representation in MRI images. I have included a picture of the contours I have for one specific slice:

I have tried the extension ‘SegmentEditorExtraEffects’ and using Fast Marching to generate better contours but it does not work well for my purpose. I would like the contours to “move” slightly to find the boundary of the objects without the object becoming greatly deformed. I have tried looking for active contours/diffusion snakes extentions and found this Sobolev Segmenter that would fit my purpose perfectly. However, it does not show up in extensions manager and was last updated 5 years ago so it seems to be discontinued and not workable in the current version. ( I also saw that there is a Robust Statistics Segmenter tool available but this requires Approx. Volume parameter, intensity homogeneity, and other input parameters that makes this method non-ideal. In summary, are there any segmentation tools close to this Sobolev Segmenter? If not, is there an easy way to export data/labelmap such that I can load it in another program to perform this? I know Matlab has built in active contours method but it would be ideal to keep segmentation “in-house” so that I can quickly visualize the segmentation and change parameters to get the best results.

Additional info: I have multiple slices segmented that form 3d models in the 3d section. Any 3D deformable model algorithms would also work great if someone can point me in the right direction.

Any help is greatly appreciated,
Thank you for reading,

Grow from seeds effect may work well for this case. The segmentation shown in the image is already quite good. In what aspects would you like to improve segmentation?

Hello Mr. Lasso,

Thank you for the very quick reply. I have used grow from seeds and the results are included below.
It seems grow from seeds deforms the contours much more than necessary unless I am doing something wrong. Is there anything else that I can use? Either in house or other programs?

Grow from seeds:


Fast Marching:
Notice the dots that it makes on the outline of the bladder (middle area - orange contour). It moved the contours too much and caused extra areas on the left.

These segmentations will be used as atlases/deformable models so it’s important for it to be as accurate as possible.

1 Like

Fast marching is not suitable for this segmentation task: it works only for segmenting structures that have very different intensity compared to surrounding region; and it only can work with one segment at a time.

Grow from seeds will work but you need to place the seeds in a sensible way. Typically you start with painting in the center of the segment:


Prostate MRI images are typically not aligned to patient axes, therefore it is recommended to align slice viewers by clicking the “Align slice views” button (see red arrow).

After you’ve painted the initial seeds, click “Initialize” and you should see something like this:


After this, switch to Paint effect and keep painting in areas where previewed segmentation result needs corrections. When you are done, go back to Grow from seeds effect and click Apply to accept the previewed result.

The original segmentations that you showed in your images above are already quite good. What do you need to improve in these segmentations?

Mr. Lasso,

Thanks for the tutorial on growing from seeds. I’ll be sure to utilize it in the future. I agree that the segmentations are good but because the user (me) defined the labels manually then that means I added error to my segmentations as there is variation added from me moving my mouse to make the contours. I wanted to minimize the error as I plan to use the data for atlas segmentation or deformable model segmentation for a research paper my team is working on. The best contour possible would be one that is based on image data (math based) and not user defined by draw, paintbrush, etc… since I may have included areas that don’t belong to the segmentation as shown here:
By using an active contour model, we can find the “best” segmentation based on edge information in the images instead of using the user defined “good” segmentations. Since the segmentations will be used as inputs for other programs/code, it’s usually a good idea to minimize error as some algorithms could propagate and amplify error.

It looks like I will have to do this in matlab/python using nrrd files and coding my own algorithm, but if you or anyone knows of an easier solution, please let me know!

I may just use the “good” segmentations and see how the results work out and revisit this at a later time.


Segmenting the bladder on MRI is trivial and Grow from seeds will give you very accurate results.

Segmenting the prostate on MRI is hard and simple active contour based methods will not help much because the difficulty is not accurately drawing the contour but knowing which contour corresponds to the prostate boundary. Also, when you generate ground truth for training and evaluating (semi)automatic segmentation methods, you do not want to use (semi)automatic methods because then the resulting segmentation would be biased or could contain other errors. For ground-truth prostate segmentation, a good approach could be to segment every N-th slice very carefully and interpolate between them using Fill between slices effect.

Prostate segmentation on MRI is a very widely studied problem, with hundreds of research papers written about it. Do not even consider coming up with a new algorithm from scratch before carefully evaluating existing methods and implementing a few promising ones.

You may try Slicer’s DeepInfer extension, which can segment prostate on MRI using deep learning based method.

Also note that there are also huge databases of prostate MRIs with accurate segmentation created by expert clinicians, so you might not even need to generate more ground-truth data.

I was considering active contours (using the manual segmentations as initial contour) but with a rigid contour parameter that would allow the contour to only deviate slightly. I would not be using active contours with the whole images as the masks, only the manual segmentation that would “move” so I would be aware of what contour corresponds to what.

I wasn’t aware of this problem using semi automatic methods for other semi automatic methods, thank you for bringing this to my attention. This isn’t prostate segmentation but female pelvic floor segmentation. Also, my sentence of “coding my own algorithm” is badly worded I meant to say writing my own script/program using functions/libraries in matlab/python. I would not come up with a new algorithm that would be a dissertation in itself haha.

I have already tried Slicer’s Deepinfer but there aren’t any models suitable for the problem. They only have a few models there. I hope they can add more in the future, this is an awesome feature for slicer to have.

Would you happen to know where I can find these databases? We have MRI data for 5 patients only and I could not find any resources online for datasets. Due to the limited dataset (50 slices per orientation(axial, etc…) per patient), I did not investigate a neural network approach to segmentation. Could you point me in the right direction or point me to someone that knows about ground truth data related to the female pelvic floor?

You can find hundreds of pelvic MRIs (mostly male, due to high occurrence of prostate cancer) in TCIA, in Prostate MRI Image database, and on various challenge websites (such as Grand Challenge).

TCIA: Image download from TCIA is greatly simplified by “TCIA browser” extension in Slicer, especially when you download only a handful of images. You may find TCGA-CESC cervical cancer MRI collection relevant (unfortunately no segmentation is available for this collection).