# 3D Slicer MHD Color Visualization

**URL:** <https://discourse.slicer.org/t/3d-slicer-mhd-color-visualization/13419>\
**Category:** Support\
**Created:** [September 10, 2020, 12:04pm UTC](https://discourse.slicer.org/t/3d-slicer-mhd-color-visualization/13419 "2020-09-10T12:04:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luis\_Carlos\_Carneiro](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/luis_carlos_carneiro/32/8051_2.png) [@Luis\_Carlos\_Carneiro](https://discourse.slicer.org/u/Luis_Carlos_Carneiro)\
**Post date:** [September 10, 2020, 12:04pm UTC](https://discourse.slicer.org/t/3d-slicer-mhd-color-visualization/13419/1 "2020-09-10T12:04:13Z")

</div>

Dear All,

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?

Thanks,

Luis Gonçalves

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [September 10, 2020, 12:21pm UTC](https://discourse.slicer.org/t/3d-slicer-mhd-color-visualization/13419/2 "2020-09-10T12:21:06Z")

</div>

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](https://github.com/acetylsalicyl/SlicerRawImageGuess).

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.
