Hi there my question is quite basic actually but I couldn’t find the is there any way or not?
I have Dicom image series and Prediction of Segmentation with .jpeg files. Basically, I am able to read them by SimpleITK but when I want to show them together I couldn’t find the solution.
viewer = sitk.ImageViewer() viewer.SetCommand('/home/oguzcan-bekar/Downloads/itksnap-3.6.0-20170401-Linux-x86_64/bin/itksnap') viewer.Execute(image) viewer.Execute(mask_array)
But this is shown individually image and segmentation in ITK-Snap. (2 window)
subprocess.run(['/home/oguzcan-bekar/Slicer-5.0.2-linux-amd64/Slicer', '--python-code', 'slicer.util.loadVolume' , '(', '/home/oguzcan-bekar/Desktop/PyQt/image.nii.gz', ')', ';', # 'seg', '=', 'slicer.util.loadSegmentation', '(','/home/oguzcan-bekar/Desktop/PyQt/mask.nii.gz', ');', 'seg.CreateClosedSurfaceRepresentation();'], shell=False)
The 3D Slicer is running but I think because of subprocess error is not able to show images and segmentation as a combined.
What is the best way to run python code to show up image and segmentation together?
Thank you very much.