I have been labelling 3D volumes for a while now, but I always have troubles to export into a format which can be easily read by ImageJ or Fiji. usually, one label is missing and others have incorrect id. Please tell me the recommended way.
The problem:
1- Load a 3D volume (I use Analyze format)
2- Go to the new Segment Editor, create at least 5 segments and draw over the volume. No problem there.
3- The segmentation can be saved as “Segmentation.seg.nrrd” or “Segmentation.nrrd” only.
How do I export to something more usual (Analyze / Nifti are more familiar to me) ? The other formats are not available in the list there.
This doesn’t work:
4- Open a new 3D Slicer window and drop the “Segmentation.nrrd” into it (load as a Volume). The funny thing is I do see the segmented regions. That’s what I want to export.
5- There, I can choose other formats, such as Analywe (.hdr) or Nifti (.nii). This creates a volume on the disk.
6- ImageJ loads a volume which has at least 5 channels, but channel 4 is gone and the channels from 5 and beyond have a index decreased by 1. Is there any explanation to this ?
Thanks for the feedback and explanations on the correct export sequence.
For import in to ImageJ/Fiji, why not use NRRD? ImageJ/FIJI had decent support for NRRD last time I used it.
I’m not sure about the Nifti part of the question – do you have any documentation of what format your other software considers as a “Nifti labelmap”? It might be helpful to link a sample dataset.
I must be missing something obvious, but I don’t see how to do it:
Fiji opens NRRD using the BioFormat plugin. I’ve updated it today.
When I throw Segmentation.nrrd on it, it complains that it doesn’t work for more than 3 dimensions.
ImageJ 1.49v and 1.50 only open a text editor when I throw the NRRD file.
For now, I assume there is no tool which converts NRRD to Nifti in dimensions higher than 3.
(The Editor in Slicer, seems to create one dimension for each Segment and store binary values for each segment. This allows a voxel to belong to multiple Segments simultaneously)
From a different application, there are reports that conversion using CMTK doesn’t allow more than 3 dimensions (link).
The first thing to figure out is what the Nifti file should look like. What do you consider to be a “more usual” analyze/nifti holding a segmentation? Is it supposed to be a 4d volume, a bitmask, or something else. (if it’s supposed to be a bitmask, try converting the segmentation to a labelmap and export that as nii).
You are all correct: I need to export into a labalmap and I didn’t know this even existed.
I’m using Slicer v4.6.2 and here are the operations I had to do: