Module for manual segmentation (MONAI Label-like)

I need to create a module to segment nifti images. My idea was to recreate the settings panel of MONAI Label (see screenshot) because it consent to connect to a server and there is a button to save the annotation and a button to upload another image from the dataset. I don’t need all the other stuff for automatic segmentation, but Segment Editor to manually segment images.
The main problem is that when you start a MONAILabel server, it also upload pretrained models for automatic segmentation. So, the function present in MONAI Label module does not simply retrieve data from a server, but it imports also the pretrained models and other information. However, I only need a section in my module that has the function to connect to the database’s URL. The module then upload the first image of the dataset, the user segments it, save the segmentation, click “next sample”, another image is uploaded, and so on.
Is there anyone that can help me?

One thing you can do is first have a look at the code of the MONAILabel Module. It is available on the github repository. Alternatively you can use the “Edit” button in the reload & test panel to open the main python file of the module.

From there you could have a look at the logic used for the communication with the server for uploading and retrieving images.

However, I don’t know how generic the code is, it might be only specific for communication with the monailabel server application. Maybe someone else can comment on the feasibility of your approach.

There is a big obstacle that I’m facing. To simplify, I found a module, called ImportFromURL, in the SlicerMorph extension that allows the retrieval of images from URLs and I created a new extension using Extension Wizard in 3D Slicer. I’ve tried to simply copy and paste the Python code of ImportFromURL in my new module, but it is not clear to me how and if I need to modify also the UI of the widget using Qt Designer. By copying and pasting the code from one module to my module, my module interface appears empty. Is there a step I am missing or am I doing something wrong?