dbdicom.Series.affine#

Series.affine(slice={}, coords={}, **filters) ndarray[source]#

Return the affine of the Series.

Raises:
Returns:

affine matrix as a 4x4 numpy array.

Return type:

np.ndarray

See also

set_affine unique_affines

Example

Check that the default affine is the identity:

>>> zeros = db.zeros((128,128,10))
>>> zeros.affine()
[[1., 0., 0., 0.],
 [0., 1., 0., 0.],
 [0., 0., 1., 0.],
 [0., 0., 0., 1.]]

Examples using dbdicom.Series.affine#