Wolfram Language & System 11.0 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

DICOM (.dcm, .dic)

  • Import and Export fully support DICOM files conforming to Section PS 3.10 of the DICOM standard.
  • Import can also read ACR/NEMA Version 2.0 files.


    MIME type: application/dicom
    DICOM medical imaging format.
    Commonly used in medical imaging equipment and picture archiving and communication systems.
    DICOM is an acronym for Digital Imaging and Communications in Medicine.
    Stores multiple raster images together with patient and device information.
    Binary format.
    Supports a variety of image encoding and data compression methods.
    DICOM Version 3.0 was introduced in 1993.

Import and ExportImport and Export

  • Import["file.dcm"] imports a DICOM file, returning an Image object.
  • Import["file.dcm",elem] imports the specified element from a DICOM file.
  • The import format can be specified with Import["file","DICOM"] or Import["file",{"DICOM",elem,}].
  • Export["file.dcm",expr] exports graphics or any other expression as an image to a DICOM file.
  • When exporting Wolfram Language graphics or arbitrary expressions to DICOM, the resulting image has the same raster size as its displayed form.
  • Image objects are by default exported at their raster size.
  • Because DICOM is a raster image format, all fonts are rasterized on export.
  • See the reference pages for full general information on Import and Export.
  • ImportString and ExportString support the DICOM format.


  • General Import elements:
  • "Elements" list of elements and options available in this file
    "Rules"full list of rules for each element and option
    "Options"list of rules for options, properties, and settings
  • Data representation elements:
  • "ColorMap"color reduction palette created on Import
    "Data"array of values
    "Graphics"Graphics object representing an image
    "Image"raster graphics given as an Image object
  • Import and Export by default use the "Image" element for the DICOM format.
  • Advanced Import elements:
  • "BitDepth"bits used to represent each color channel in the file
    "Channels"the number of color channels used in the file
    "ColorSpace"color encoding used in the file
    "ImageSize"raster dimensions
    "MetaInformation"meta-information stored in the file
    "Summary"summary of the file


  • Import and Export option:
  • "ImageTopOrientation"Toporientation of the image as stored in the file
    ImageSizeAutomaticoverall image size
  • Advanced Export option:
  • "Smoothing"0the DICOM smoothing parameter, given as a number in the range 0 to 1

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Import a DICOM file containing a gray-level image:

Click for copyable input

Summary of an image:

Click for copyable input

Export an image to DICOM:

Click for copyable input
Introduced in 2003
| Updated in 2016