Unable to load .zraw files along with .mhd files

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 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?

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.

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.

1 Like

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.

@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).

1 Like