If you have a 3dim numpy arry, And if this data represents a volumetric object. (CT、OCT or other 3dscan date)
For example:
import numpy as np
from vnumpy.v3d import npshow2
from batchgenerators.utilities.file_and_folder_operations import join
from nnunetv2.imageio.simpleitk_reader_writer import SimpleITKIO
from nnunetv2.inference.predict_from_raw_data import nnUNetPredictor
import nrrd
image_file=r"./input-volume0.nrrd"
image_file2=r"./output-segmentation.nrrd"
print(f"Loading image from {image_file}")
imgs, prop = SimpleITKIO().read_images([image_file])
imgs2, prop2 = SimpleITKIO().read_images([image_file2])
npshow2(imgs[0],imgs2[0])
20241017_105358.mp4
Install vnumpy
from PyPi:
pip install vnumpy
This is a Test version now