I have performed segmentation using NVDIA AIAA segmentation models.
It works well.
However,I want to store the segmented file as nii file,as my main purpose is to use the annotated file to build an AI model using transfer learning and feeding annotated files is necessary here.
I am able to store the files but the files are coming in different formats after performing segmentation and one of the file which is saved as nii file is just like the input file I loaded without the segmentation parts mapped.
Kindly help me with this.
First of all, do not use nifti (nii) file format, unless you work with brain imaging. Nifti is specifically developed for brain imaging, mostly for MRI, and it is not a general-purpose file format.
If you use a recent Slicer Preview Release then segmentation that does not have overlapping segments is saved into a simple 3D nrrd file, which you can read with any nrrd reader. Nrrd reader should be available in every environment where nifti reader is available.
If you work with brain images and you must use nifti format then you can convert the segmentation to labelmap volume by right-clicking on the segmentation in Data module. You can then save this labelmap volume in a wide variety of file formats, including nifti.