# Unable to load .zraw files along with .mhd files

**URL:** https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030
**Category:** Support
**Created:** [January 30, 2020, 4:22pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030 "2020-01-30T16:22:09Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![matt-warkentin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/matt-warkentin/32/4962_2.png) [@matt-warkentin](https://discourse.slicer.org/u/matt-warkentin)
#### Post date: [January 30, 2020, 4:22pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030/1 "2020-01-30T16:22:09Z")

</div>

Hi all,

I have been provided `.zraw` files and corresponding `.mhd` files (segmentation masks). I can load the `.mhd` masks into Slicer without issue.

However, I am having trouble loading a `.zraw` file into Slicer. Based on [this](https://discourse.slicer.org/t/change-display-range-of-raw-file/6320/4) previous post, I had assumed I could load the data via _drag-and-drop_ or through the `data` module, but neither seems to work. When trying either approach, nothing happens.

For context, I have tried `Slicer 4.10.1` and also the preview version (`4.11.0`), downloaded a few months back (not the most recent nightly build).

Any advice?

---

<div class="post-metadata">

### Author: ![muratmaga](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/muratmaga/32/3622_2.png) [@muratmaga](https://discourse.slicer.org/u/muratmaga)
#### Post date: [January 30, 2020, 4:52pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030/2 "2020-01-30T16:52:15Z")

</div>

From the file name .zraw sounds like zstack in raw format. Since you can read the segmentation map already, you know the image dimensions. Use the preview version, and install the SandBox extension and try the RawImageGuess module entering the XYZ extends from your segmentation. The only unknown that will be left would be data type, but that should only take a few iterations.

Here is the thread on the RawImageGuess and a video tutorial.

> [@New extension: RawImageGuess - for loading of images from unrecognized file format](https://discourse.slicer.org/t/new-extension-rawimageguess-for-loading-of-images-from-unrecognized-file-format/9219):
>
> There are proprietary image file formats the 3D Slicer does not recognize and so refuses to load. @nagy.attila in collaboration with Slicer core developers created an extension that can be used to load data from files that use an unknown format. [RawImageGuess extension](https://github.com/acetylsalicyl/SlicerRawImageGuess) offers a number of parameters (image header size, dimensions, pixel type, etc.) that users can adjust and see the resulting image in real-time. This makes it possible to guess the image format in a couple of minutes. See a demo …

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [January 30, 2020, 5:12pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030/3 "2020-01-30T17:12:01Z")

</div>

If you have a MHD (header file) + zraw (compressed image data), you just need to drag and drop the MHD file into Slicer for loading. One of the header keys in the MHD would be something like `ElementDataFile = FileName.zraw`. As part of reading and loading the header information it will automatically load the specified data file. You don’t need to manually load the header and also load the zraw. It’s one action of drag-dropping the MHD.

---

<div class="post-metadata">

### Author: ![matt-warkentin](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/matt-warkentin/32/4962_2.png) [@matt-warkentin](https://discourse.slicer.org/u/matt-warkentin)
#### Post date: [January 30, 2020, 5:22pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030/4 "2020-01-30T17:22:30Z")

</div>

Thanks @jamesobutler. So the MHD file is just the header information with a file pointer to the actual image (mask) data? Is this a correct mental model of what is going on here? So by loading the MHD file, Slicer knows where to find the actual image data in ZRAW format.

---

<div class="post-metadata">

### Author: ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)
#### Post date: [January 30, 2020, 7:13pm UTC](https://discourse.slicer.org/t/unable-to-load-zraw-files-along-with-mhd-files/10030/5 "2020-01-30T19:13:35Z")

</div>

@matt-warkentin Yes, that is correct. As long as your MHD header file has the ElementDataFile pointing to a image data file that exists, then dragging dropping the header only file will load the full data. If it is confusing to have the image data separate from the header, there is MHA which is the combined file (header + data).
