I have below code. print(image.GetDimension())
works and prints the output (512, 512, 17)
. But sitk.Show(image)
doesn't work.
My Code
import SimpleITK as sitk
path = "C:/Users/myUserName/Desktop/0001.DCM"
image = sitk.ReadImage(path)
print(image.GetDimension())
sitk.Show(image)
My error message is:
RuntimeError: Exception thrown in SimpleITK Show: D:\a\1\sitk\Code\IO\src\sitkImageViewer.cxx:562:
sitk::ERROR: Error in administrating child process: [Access is denied].
Command line: 'C:\Users\myUserName\Fiji.app' 'C:\\Users\\myUserName\\AppData\\Local\\Temp\\TempFile-21536-2.mha'
How can I fix that? I have unzipped ImageJ and put the Fiji.app
folder at C:\Users\myUserName\Fiji.app
. The DICOM image 0001.DCM
has no problem as I can view it via some online DICOM viewer. I am using Windows 10, and run my Python code in Spyder. Thanks in advance!