此为 Mathematica 7 文档,内容基于更早版本的 Wolfram 语言
查看最新文档(版本11.1)
Import/Export 导入/导出 格式

DICOM (.dcm,.dic)

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 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.
  • Import["file.dcm"] imports a DICOM file, returning an Image object.
  • Export["file.dcm", expr] exports graphics or any other expression as an image to a DICOM file.
  • When exporting Mathematica 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.
  • Import["file.dcm", elem] imports the specified element from a DICOM file.
  • Import["file.dcm", {elem, suba, subb, ...}] imports a subelement.
  • Import["file.dcm", {{elem1, elem2, ...}}] imports multiple elements.
  • The import format can be specified with Import["file", "DICOM"] or Import["file", {"DICOM", elem, ...}].
  • Export["file.dcm", expr, elem] creates a DICOM file by treating expr as specifying element elem.
  • Export["file.dcm", {expr1, expr2, ...}, {{elem1, elem2, ...}}] treats each expri as specifying the corresponding elemi.
  • Export["file.dcm", expr, opt1->val1, ...] exports expr with the specified option elements taken to have the specified values.
  • Export["file.dcm", {elem1->expr1, elem2->expr2, ...}, "Rules"] uses rules to specify the elements to be exported.
  • See the reference pages for full general information on Import and Export.
"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 color values
"Graphics"Graphics object representing an image
"Image"raster graphics given as an Image object
"GrayLevels"array of normalized gray-level values
"RawData"raw bitmap data as stored in the file
"RGBColorArray"array of RGBColor objects
  • Import and Export by default use the "Image" element for the DICOM format.
"BitDepth"bits used to represent each color channel in the file
"ColorSpace"color encoding used in the file
"ImageSize"raster dimensions
  • General option:
ImageSizeAutomaticoverall image size
"ImageTopOrientation"Toporientation of the image as stored in the file
"Smoothing"0the DICOM smoothing parameter, given as a number in the range 0 to 1
Import a DICOM file containing a gray-level image:
In[1]:=
Click for copyable input
Out[1]=
Show the Import elements available in this file:
In[2]:=
Click for copyable input
Out[2]=
Read the meta-information from this DICOM file, showing only the first rules:
In[3]:=
Click for copyable input
Out[3]=
Read all meta-information and format it as a Grid:
In[4]:=
Click for copyable input
Out[4]=