Message Boards Message Boards

How to apply Image3D with DICOM files?

Posted 1 year ago

I have a number of DICOM files (series) from the last CT Scan of my brain.

The import is running well:

im = Import["…\IM000001.dic", {"DICOM", "Image"}];

I have chosen this command line because it keeps the MetaInformation in the image. The MetaInformation contains information like,

  • SliceThickness
  • SpacingBetweenSlices
  • SliceLocation

I assume this information is necessary to build a proper Image3D of my brain. But it seems to me that Mathematica does not make use of it. The image below contains 25 slices / images. But the outcome is a rather flat representation: enter image description here What is my mistake? Who can help?

POSTED BY: Jürgen Kanz
2 Replies

A series of DICOM files is typically accompanied by a DICOMDIR file. If this is the case for you, the recommended way to import a 3D image would be:

Import["path/to/DICOMDIR", "Image3D"]

and it will automatically use the meta information to choose proper thickness of slices.

If you only have a series of DICOM files, import all of them to a list of images, as you have already done, extract the values of "PixelSpacing" and "SliceThickness" and pass these values as the BoxRatios option to the Image3D constructor.

POSTED BY: Rafal Chojna

Rafal,

Thank you very much. It works (of course).

Perhaps it would be wise to add a note in the documentation for DICOMDIR that this is a file. Less smart people like me are probably searching for a directory with this name. Of course, professionals will know it.

POSTED BY: Jürgen Kanz
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract