deepmr.rigid_motion#
- deepmr.rigid_motion(ndims, nframes, degree='moderate', seed=42)[source]#
Generate rigid motion pattern as a Markov Chain process.
- Parameters:
Notes
Severity of motion can be specified via the
degree
argument. This can be a string - accepted values are"subtle"
,"moderate"
and"severe"
. These corresponds to the following motion ranges:"subtle"
: maximum rotation5.0 [deg]
; maximum translation2.0 [mm]
"moderate"
: maximum rotation10.0 [deg]
; maximum translation8.0 [mm]
"severe"
: maximum rotation16.0 [deg]
; maximum translation16.0 [mm]
As an alternative, user can specify a tuple of floats, where
degree[0]
is the maximum rotation in[deg]
anddegree[1]
is the maximum translation in[mm]
.- Returns:
angleX (torch.Tensor) – Rotation about
x
axis in[deg]
of shape(nframes,)
.angleY (torch.Tensor) – Rotation about
y
axis in[deg]
of shape(nframes,)
.angleZ (torch.Tensor) – Rotation about
z
axis in[deg]
of shape(nframes,)
.dx (torch.Tensor) – Translation towards
x
axis in[mm]
of shape(nframes,)
.dy (torch.Tensor) – Translation towards
y
axis in[mm]
of shape(nframes,)
.dz (torch.Tensor) – Translation towards
z
axis in[mm]
of shape(nframes,)
.