dbdicom.Series.affine#
- Series.affine() list [source]#
Return a list of unique affine matrices in the series
- Raises:
ValueError – if the file is corrupted and necessary DICOM attributes are not included.
- Returns:
list of 4x4 ndarrays with the unique affine matrices of the series.
- Return type:
See also
Example
Check that the default affine is the identity:
>>> zeros = db.zeros((128,128,10)) >>> print(zeros.affine()) [array([ [1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]], dtype=float32)]
Note this is a list of one single element as the series only has a single slice group.