we are segmenting a few hundred mri brain images.
we have mri scans stored in .nii.gz format.
we have segmentations stored in the same .nii.gz format.
now we are adding new features so we have to edit the segmentations.
opening scans & segmentations via drag and drop…
scans as VOLUMES
segmentations as SEGMENTATION
after editing (it is really cumbersome that Slicer doesn’t remember the settings ;( )
we save the new segmentation as .nrrd segmentations.
NOW! We reopen this .nrrd segmentations as VOLUMES and save the segmentations as .nii.gz again.
That works in many cases, BUT there are lots of cases where we get an error:
Adding data failed
Error occurred while loading the selected file
Click “Show details” button to…
End the info of the “Show details” button is:
Error: …file… - load failed.
Any idea how we can solve this problem???
Thanks for your help.
Slicer remembers the settings. If you can give more details about what details are not preserved then let us know.
If you provide more information (for example, an image that cannot be opened) then we can have a look. However, I agere with @muratmaga - there is a good chance that the issues are due to that you are using NIFTI file format. NIFTI is not a general-purpose 3D image file format and it suffers from ambiguities and has serious limitations.
thank you for your help…
can you give me an address where I can show such files?
This is multi-center machine learning data. So there are no .nrrd files.
Oh really?
What I mean:
when I do the next segmentation and I open the segmentation in the segment editor, for example the 3d view is inactive at the start… I would like to have it active…
e.g. Paint tool:
Diameter of paint tool is 3% I need 1%
Sphere brush is inactive, I need it active…
Editable intensity range is inactive… need it active…
and so on… other tools as well.
that would be really nice to have…
I was able to open both files and load them as segmentations without any problem or error messages. I didn’t have to change anything or set any option. I can edit them as well.
yes that is correct.
the problem is: how to convert it into niftis again?
when I want to store it as nifti, I have to open it as VOLUME and that doesn t work…
is there a workaround?
thanks…
(there just one or two that don t open as segmentation & volume but thats not a problem to segment this number again… )
As we mentioned before, you will run into issues if you try to save a segmentation file as a nifti and try to load it as a segmentation into Slicer. NIFTI format will not store all the necessary information (like segment names, colors etc), and Slicer will have trouble reading back as a segmentation.
If you must save a nifti for some reason, then first export your segmentaiton as a labelmap, then you can save it as nifti. However, you will loose things like segment names and colors. To avoid that you can also look into creating a custom color table.