fsl.data.dicom
¶
This module provides the DicomImage
class, which represents a
volumetric DICOM data series. The DicomImage
is simply an `Image
which provides accessors for additional DICOM meta data.
The following other functions are provided in this module, which are thin
wrappers around functionality provided by Chris Rorden’s dcm2niix
program:
enabled |
Decorator which can be used to memoize a function or method. |
scanDir |
Uses dcm2niix to scans the given DICOM directory, and returns a list of dictionaries, one for each data series that was identified. |
loadSeries |
Takes a DICOM series meta data dictionary, as returned by scanDir() , and loads the associated data as one or more NIFTI images. |
See: https://github.com/rordenlab/dcm2niix/
Note
These functions will not work if an executable called dcm2niix
cannot be found.
-
fsl.data.dicom.
MIN_DCM2NIIX_VERSION
= (1, 0, 2017, 12, 15)¶ Minimum version of dcm2niix that is required for this module to work.
-
class
fsl.data.dicom.
DicomImage
(image, metadata, dicomDir, *args, **kwargs)¶ Bases:
fsl.data.image.Image
The
DicomImage
is a volumetricImage
with some associated DICOM metadata.The
Image
class is used to manage the data and the voxel-to-world transformation. Additional DICOM metadata may be accessed via theImage
metadata access methods.-
dicomDir
¶ Returns the directory that the DICOM image data was loaded from.
-
keys
()¶ Deprecated - use
Image.metaKeys()
.Deprecated in 1.6.0, to be removed in 2.0.0. Use metaKeys instead
-
values
()¶ Deprecated - use
Image.metaValues()
.Deprecated in 1.6.0, to be removed in 2.0.0. Use metaValues instead
-
items
()¶ Deprecated - use
Image.metaItems()
.Deprecated in 1.6.0, to be removed in 2.0.0. Use metaItems instead
-
get
(*args, **kwargs)¶ Deprecated - use
Image.getMeta()
.Deprecated in 1.6.0, to be removed in 2.0.0. Use getMeta instead
-
-
fsl.data.dicom.
scanDir
(dcmdir)¶ Uses
dcm2niix
to scans the given DICOM directory, and returns a list of dictionaries, one for each data series that was identified. Each dictionary is populated with some basic metadata about the series.Parameters: dcmdir – Directory containing DICOM files. Returns: A list of dictionaries, each containing metadata about one DICOM data series.
-
fsl.data.dicom.
loadSeries
(series)¶ Takes a DICOM series meta data dictionary, as returned by
scanDir()
, and loads the associated data as one or more NIFTI images.Parameters: series – Dictionary as returned by scanDir()
, containing meta data about one DICOM data series.Returns: List containing one or more DicomImage
objects.