I am trying to visualize the MHD file with the following header in 3D Slicer without success:
ObjectType = Image
NDims = 3
BinaryData = True
BinaryDataByteOrderMSB = False
CompressedData = False
TransformMatrix = 1 0 0 0 1 0 0 0 1
Offset = 0 0 0
CenterOfRotation = 0 0 0
AnatomicalOrientation = RAI
ElementSpacing = 0.29999999999999999 0.29999999999999999 0.29999999999999999
DimSize = 768 768 576
ElementType = MET_UCHAR_ARRAY
ElementNumberOfChannels = 3
ElementDataFile = seg_final.raw
I can visualize in ITK-SNAP.
Must I do something?
You can only load scalar images (
ElementNumberOfChannels = 1) from mhd files.
If you want to load vector images or displacement fields then use nrrd file format (nhdr header file) instead. You can create a nhdr header for your data using RawImageGuess extension.
To load segmentation data, do not store it as color image! Segmentations are scalar images and you assign the color to each scalar value using a color map (or by importing it into a segmentation).
To make a labelmap volume file loaded as labelmap volume by default, add
-label suffix to the filename (
example-label.nrrd); to make it loaded as segmentation by default, use
.seg.nrrd extension (
example.seg.nrrd). Otherwise you need to would need to click on “Show options” and “Labelmap” checkboxes in Add Data window.