MCPcopy Create free account
hub / github.com/Project-MONAI/MONAI / affine

Method affine

monai/data/meta_tensor.py:464–466  ·  view source on GitHub ↗

Get the affine. Defaults to ``torch.eye(4, dtype=torch.float64)``

(self)

Source from the content-addressed store, hash-verified

462
463 @property
464 def affine(self) -> torch.Tensor:
465 """Get the affine. Defaults to ``torch.eye(4, dtype=torch.float64)``"""
466 return self.meta.get(MetaKeys.AFFINE, self.get_default_affine()) # type: ignore
467
468 @affine.setter
469 def affine(self, d: NdarrayTensor) -> None:

Callers 1

__call__Method · 0.80

Calls 3

get_default_affineMethod · 0.95
getMethod · 0.80
as_tensorMethod · 0.80

Tested by

no test coverage detected