# Visualization of a mhd color file

**URL:** https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663
**Category:** Support
**Created:** [June 28, 2020, 10:37pm UTC](https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663 "2020-06-28T22:37:26Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Luis\_Carlos\_Carneiro](https://discourse.vtk.org/user_avatar/discourse.vtk.org/luis_carlos_carneiro/32/1360_2.png) [@Luis\_Carlos\_Carneiro](https://discourse.vtk.org/u/Luis_Carlos_Carneiro)
#### Post date: [June 28, 2020, 10:37pm UTC](https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663/1 "2020-06-28T22:37:27Z")

</div>

Dear All,

Could you please provide a VTK script to read and visualize in color a .mhd file of MET\_UCHAR\_ARRAY of 3 dimensions (RGB)?

Thanks,

Luis Gonçalves

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [June 29, 2020, 6:46am UTC](https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663/2 "2020-06-29T06:46:22Z")

</div>

As a starter you may like to look at these examples: [https://lorensen.github.io/VTKExamples/site/Cxx/#medical](https://lorensen.github.io/VTKExamples/site/Cxx/#medical) these all use .mhd files. Also [https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/FlyingFrogSkinAndTissue/](https://lorensen.github.io/VTKExamples/site/Cxx/Visualization/FlyingFrogSkinAndTissue/) may give you more ideas, in this example the individual organs are assigned different colours. Addidionally look at: [https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/RayCastIsosurface/](https://lorensen.github.io/VTKExamples/site/Cxx/VolumeRendering/RayCastIsosurface/)

---

<div class="post-metadata">

### Author: ![Luis\_Carlos\_Carneiro](https://discourse.vtk.org/user_avatar/discourse.vtk.org/luis_carlos_carneiro/32/1360_2.png) [@Luis\_Carlos\_Carneiro](https://discourse.vtk.org/u/Luis_Carlos_Carneiro)
#### Post date: [June 29, 2020, 6:56am UTC](https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663/3 "2020-06-29T06:56:01Z")

</div>

Sorry, I forget that I want my examples in Python. Thanks.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [June 29, 2020, 8:14am UTC](https://discourse.vtk.org/t/visualization-of-a-mhd-color-file/3663/4 "2020-06-29T08:14:10Z")

</div>

If you look at the code on the web page there will be a link to a Python example, if it exists. From memory I think there are corresponding Python examples for most of those examples that I gave you.
