darsia.imread_from_dicom#

imread_from_dicom(path, dim=2, transformations=None, **kwargs)[source]#

Initialization of Image by reading from DICOM format.

Assumptions: Coordinate systems in DICOM format are organized in an ijk format, which is different from the ijk format used for general images. DICOM images come in slices, and conventionally the coordinate system is associated relatively to the object to be scanned, which is not the coordinate system according to gravity, since objects usually lie horizontally in a medical scanner. In DarSIA we translate to the standard Cartesian coordinate system such that the z-coordinate is aligned with the gravitational force. Therefore the ijk indexing of standard DICOM images is not consistent with the matrix indexing of darsia.Image. The transformation of coordinate axes is performed here.

Parameters:
pathPath, or list of such

Path to dicom stacks.

dimint

Spatial dimensionality of the images.

transformationslist of callables

Transformations.

**kwargs

Keyword arguments.

Returns:
darsia.Image

3d space-time image.

Raises:
ImportError

If pydicom is not installed.

NOTE: Merely scalar data can be handled.