Add my own segmentation model to 3D Slicer

Previously we were trying to add a plugin in windows and install the required packages of our plugin using PythonSlicer.exe in windows.

PythonSlicer.exe -m pip install -r requirements-slicer.txt

Similarly how to do a this kind of installation of packages in ubuntu OS

It looks good in general. However, I would not recommend to install pytorch like this. Pytorch is now used very commonly - all AI extensions use it - and we provide the PyTorch extension to install it, as the installation can go wrong in many ways. You can see an example of how it is used in MONAIAuto3DSeg and TotalSegmentator extensions.

I’m not sure what you mean by plugin though, as neither Slicer nor Python use plugins. Slicer has extensions that you can install via Slicer’s Extensions Manager, while Python has packages that you can install via pip.

Hi Iassoan We are trying to add a our own developed segmentation model as a part of Slicer which I referred as the plugin here, for that I want to know how can I install the packages required using the Slicer.

In windows OS Pythonslicer.exe is used to install the required packages, similarly what is used to install packages in ubuntu OS

Thanks for the clarification. I would recommend to use similar extensions as example. You can use MONAIAuto3DSeg as an example for implementing MONAI based model, or DentalSegmentator for nn-UNet based model.

Hi Iassoan Recently I have been facing this issue

“[/home/ubuntu/Slicer-SuperBuild-Debug/Slicer-build/bin/./SlicerApp-real] exit abnormally - Report the problem.”