Looking at that tool, the output of segmentation is stored as a numpy array. In order to use common image visualization tools, you need to store that array into a more generic 3D format.
You could use SimpleITK or itk-python to import numpy array into an ITK image. You can find the specific recipe how to do this and store the result into a file here: https://itkpythonpackage.readthedocs.io/en/latest/Quick_start_guide.html#mixing-itk-and-numpy.
One thing that will be missing in the file you save is the geometry information about the image. Probably the easiest way to address this is to first convert the input DICOM image series into 3D format (you can do this using dcm2niix that will store the resulting volume as NIfTI), load that volume into Python using the aforementioned SimpleITK or itk-python, which will also give you the option to export the loaded image into a numpy array. If you start with that array for your segmentation task, the arrangement of voxels in the segmentation numpy array will be the same as in the image numpy array. So when you export numpy array into a SimpleITK or itk-python image, you can copy image geometry to initialize segmentation geometry (you will need to use Get/SetDirection
, Get/SetSpacing
and Get/SetOrigin
).
Once you store it in a file, you can use tools such as 3D Slicer to load the original DICOM image series, and overlay segmentation results.
Unfortunately, it's a lot of steps, and I understand this will be confusing. But hope it will help you get started!