I have a 3D nii image representing the ROI of tumor region in brain. It is displaying properly with Slicer.
However, when I try to display the same image using SimpleITK gui, I see a black image. My SimpleITK code is
import SimpleITK as sitk
import gui
import numpy as np
ROI_image = sitk.ReadImage("Coreg/Data1/roi.nii", sitk.sitkFloat32)
ROIwindowMinimum = float(np.array(ROI_image).min())
ROIwindowMaximum = float(np.array(ROI_image).max())
ROI_window_level = (ROIwindowMaximum-ROIwindowMinimum, (ROIwindowMaximum+ROIwindowMinimum)/2)
print(ROIwindowMinimum)
print(ROIwindowMaximum)
print(ROI_window_level)
gui.MultiImageDisplay(
image_list=[ROI_image],
title_list=["ROI"],
figure_size=(8, 4),
window_level_list=[ROI_window_level],
);
Output is