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:
|
Decorator which can be used to memoize a function or method. |
Uses |
|
Takes a DICOM series meta data dictionary, as returned by |
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.-
property
dicomDir
¶ Returns the directory that the DICOM image data was loaded from.
-
property
-
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.