Using Monai Label in 3DSlicer for Medical Student Research Project


I am a medical student with no computer science background looking for some help with using Monai Label with 3D slicer. My main issue is with connecting to the Monai Server.

I was able to follow a tutorial online and use anaconda terminal to download the monai pip package, connect to the server and then was able to run the model on the test data and segment out the spleen CT. But was wondering if there is a more permanent way to download Monai Label Radiology instead of having to do it every time from the terminal. I am a bit confused in the workflow to generate labeled scans without having to go through the download process and server activation every time. Any insight would be very helpful, I have gotten confused trying to understand the technical aspects of this program.

For background, I am a medical student working on a research project to calculate surface areas of organs from CT scans, this would ideally be automated by a model such as Monai Label Radiology. Thank you in advance.

MONAI Label is a very powerful environment but may not be strictly needed for your project, or at least not be the ideal place to start. DId you look at TotalSegmentator and Auto3DSeg? I believe they will give you spleen segmentations pretty easily and you could focus on calculating surface areas (which might also be mostly automatic, but you may need to review/fix the results to match your protocols).

1 Like

Hi Steve, Thank you for your quick response. I had not look at either but just downloaded the Auto3DSeg module to try it out and yes it is much easier to use and seems like it will work for my purposes. Thank you! I went into a hole on MonaiLabel and it seems to be out of my technical ability range.

Another question for you if you have the time… My project would require surface area of the Liver + spleen which seems doable with the preset models. However I am also looking for the surface area of the abdominal cavity, not an organ that would be pretrained with the models in Auto3Dseg. How feasible would it be for me to feed contoured images into the model to give an output of the abdominal cavity?

It’s great that you can leverage these tools for your research - be sure to let us know how it goes.

Regarding liver/spleen surface areas, you should be able to get that from SegmentStatistics. You’ll want to look at each scan to confirm the organ isn’t clipped by the scan field of view or not otherwise poorly segmented (these models aren’t so robust for people with big pathologies or post-op conditions). Then maybe you just merge all the organs in the abdominal cavity into one segment and get the area or volume of that. While you could retrain a model it’s probably better to see if you can meet your research goals using existing models.

1 Like

Hi Steve,

Thank you for all of your help, I will be sure to keep you posted on my research. I was able to use SegmentStatistics and it is very helpful to my goal.

Regarding abdominal cavity, the surface area that I am looking for on top of the organ surface area is the parietal peritoneum. Which is different than the addition of all abdominal organ surface areas. It is the outside border of the abdomen. A way that we could estimate this would be to just outline the 3D model of the abdominal organs and see what that surface area is. I am not sure if this is possible, but will look around the program. Please let me know if you have any ideas or contacts I could reach out to! And thanks for keeping everything open-source, this has been a great tool and learning experience.

You can get a “bag” (convex or concave hull, like a “shrinkwrap”) around all your segmented abdominal organ segments by using SurfaceWrapSolidify extension. Since the shape is quite simple, you may also be able to very quickly segment the peritoneum by painting it on 5-10 slices and use Fill between slices effect.

This is probably not a very hard segmentation task, so if you create a few dozen segmentations with manual/semiautomatic tools then there is a chance that you can train a segmentation network (MONAI Auto3DSeg or nn-UNet) with them. If it does not work with a few dozen training images then it will work if you provide a few hundred.

1 Like

Hi Andras,

Thanks for replying, I have been learning a lot from your previous threads so it is nice to hear from you.

I have used SurfaceWrapSolidify and it does a pretty good job, I am attaching the results. The front edge of the abdominal wall is very well estimated, the back less so, not as many inclusion points in the back so I am going to workshop that to be more accurate. I am trying to stay away from training my own segmentation network because I am not great with the coding aspect. But any guidance on that end would be great. Also any tips on getting a more accurate wrap would be great too. Once again, thanks a lot. This is a great tool.

Hi @lassoan I know I’ve taken up some of your time, just bumping this in case you have any ideas.

Hi @lassoan is there a way to set exclusion criteria to wrap solidify? I.e. remove structures from the created wrap such as pancreas, kidney, vertebrae?

I’m not sure what improvements are you looking for. If you want to allow some concavities (follow the shape of the segment more closely) then you can enable Carve holes and adjust the slider next to it.