MHD to PDF Converter: One Slice per A4 Page | MiConvert

MHD to PDF: Export One MetaImage Slice as an A4 Page

Get one grayscale slice of a MetaImage volume on a one-page A4 PDF, rendered in your browser. Most .mhd files point to a separate .raw file, which this one-file tool never receives, so resave the volume as a single .mha or .nrrd and convert that instead.

🔒 Zero-Upload — Your files never leave your device
🏥

Drop your file here

DICOM (.dcm, single files or a whole series), NIfTI (.nii, .nii.gz), NRRD (.nrrd), MHA (.mha), MHD (.mhd + .raw)

Select File

Up to 1 GB per file • Processed locally

Zero Upload 100% Browser Processing No Sign Up 100% Free
MHD → PDF

What an MHD file is, and what this converter can do with it

An .mhd file is the text header of the MetaImage format used by ITK and the tools built on it, such as 3D Slicer. It lists the volume's dimensions, voxel spacing and pixel type, plus an ElementDataFile line that names where the voxels actually live, normally a companion .raw or .zraw file. PDF readers and ordinary image viewers understand neither half, so a slice has to be rendered as a picture before it can go into a document.

The catch on this page: the converter accepts exactly one file, so it never sees the .raw that a standard .mhd points to, and it stops with "Invalid MHA file: could not find data section". The only .mhd it can read is one whose header says ElementDataFile = LOCAL, meaning the voxels are stored after the header in the same file. For the usual two-file pair, resave the volume as a single .mha or .nrrd and upload that here.

A readable volume is parsed by the page script inside your browser tab. It opens on the middle slice and maps it to 8-bit grayscale using the 1st to 99th percentile of that slice's values, and you can change the slice, window and level before exporting. The jsPDF library then builds one A4 page, portrait or landscape to match the slice's shape, with a 10 mm margin and the image embedded as PNG.

What survives is the chosen slice's pixel grid at its native resolution and the contrast exactly as it looked on screen. Lost: every other slice, the original bit depth and intensity values, voxel spacing, orientation and all header fields. Color (RGB) volumes are not supported; the renderer is grayscale only. Treat the result as a figure, not a measurement or diagnostic record.

How to turn an MHD volume into a PDF page

  1. Open the .mhd in a text editor and read the ElementDataFile line. If it says LOCAL, the file is self-contained and you can skip to step 3. If it names a .raw or .zraw file, continue with step 2.
  2. Load the pair in 3D Slicer, or read it with ITK or SimpleITK, keeping the .mhd and .raw in the same folder. Save the volume as a single .nrrd, or as an .mha with compression turned off.
  3. On this page, choose your one file (up to 200 MB) and pick PDF as the output. A resaved .mha or .nrrd can be dropped here directly.
  4. Drag the slice slider to the slice you want; it starts in the middle of the stack. Use the window and level sliders if the automatic contrast hides the structure you care about.
  5. Export and save the PDF. For another slice, move the slider and export again, since each PDF holds a single page.

What the MHD to PDF export gives you

  • Slice and contrast control: start on the middle slice, pick another with the slider, and adjust window and level before export.
  • The slice is embedded as PNG, so the PDF adds no JPEG compression.
  • Local decoding: the page parses the volume itself, and the file contents are not uploaded to MiConvert's servers.
  • The same tool reads self-contained .mha files and .nrrd files with raw or gzip encoding, and can also save the slice as PNG or JPG.
  • A clear error message in place of a blank page when an .mhd refers to data the converter was not given.

Video Tutorial

Are you struggling with how to convert your MHD file to PDF format? Don't worry, in this video I will reveal a super convenient tool to help you change your file extension completely for free without

MHD to PDF questions

Why do I get "Invalid MHA file: could not find data section"?

The .mhd references a separate .raw or .zraw file that a one-file upload never includes. Resave the volume as a single .mha or .nrrd in 3D Slicer or ITK and upload that. A malformed .mha header gives the same message; resaving it is the first thing to try.

How do I convert an MHD and RAW pair into one file?

In 3D Slicer, load the .mhd with the .raw beside it, then save the volume as .nrrd or .mha. In SimpleITK, read the .mhd and write it out with an .mha or .nrrd file name. If you pick .mha, turn compression off, because compressed MetaImage data is not decompressed here. A gzip-encoded .nrrd works.

Will the PDF keep spacing, orientation or the original intensity values?

No. The slice is windowed down to 8-bit grayscale, and no header information, spacing or orientation is written into the PDF. Measurements taken from the page are not reliable, and the output is not suitable for diagnosis. Keep the original volume for any analysis.

Is my scan uploaded or stored?

The file contents are read and rendered in your browser and are not sent to our servers, so there is no server copy to keep or delete. The PDF is saved straight from the page. A few things do leave your computer. The libraries load from the jsDelivr CDN, which sees your IP address. If Google Analytics is loaded, the file name, size and format go with usage events. A file over 200 MB is reported to our server by name, size and format when it is rejected. There is no anonymization step, so text burned into the pixels stays in the PDF. Rename files that contain patient details before converting.

Is there a size limit, and can I convert several files at once?

One file per conversion, up to 200 MB. The limit is the same on every plan, because paid plans do not change it for medical formats. There is no batch mode on this page.

The slice looks like noise, or the page says the engine is not loaded. What now?

Garbled output can come from data the reader does not handle: big-endian voxels (ElementByteOrderMSB = True is ignored) or compressed MetaImage data. Resave the volume as an uncompressed little-endian .mha, or as a little-endian .nrrd with raw or gzip encoding. If you see "Medical converter engine not loaded", a script from cdn.jsdelivr.net was blocked or failed to load. Allow that domain and reload, and stay online, because the page does not work offline.

Is this about MHD maps, licenses or the MHD date on food?

No. MHD is also the name of a car tuning app, and on German food labels it stands for the best-before date (Mindesthaltbarkeitsdatum). This page only handles .mhd MetaImage files from medical and scientific imaging.