pub struct VolumeMotion {
pub index: usize,
pub transform: RigidTransform,
pub bdir: (f64, f64, f64),
pub rotation_deg: f64,
pub translation_mm: f64,
pub max_displacement_mm: f64,
pub ncc: f64,
pub overlap: f64,
pub suspect: bool,
}Expand description
Where one volume of a series was, and which way B0 pointed while it was there.
Fields§
§index: usizeIndex into the input series.
transform: RigidTransformThe recovered alignment onto the reference volume. Identity for the reference itself.
bdir: (f64, f64, f64)This volume’s B0 direction in the reference grid’s voxel frame — the direction its field map was acquired under, and the one a dipole kernel built on the reference grid has to use for it.
For the reference volume this is just its own direction. For a volume whose head had rotated it is that direction carried through the recovered rotation, which is the whole point: the object rotated and B0 did not.
rotation_deg: f64Total rotation angle in degrees, regardless of axis.
translation_mm: f64Translation magnitude in mm of world space.
max_displacement_mm: f64Largest distance any tissue inside the evaluation domain actually moved, in mm.
Rotation and translation are not comparable to each other or to a voxel size, and a small
rotation about a distant centre moves tissue a long way. This is the single number that
answers “did this matter”: compare it against the voxel size. The domain is the mask when
one was passed to estimate_motion and the reference grid’s corners otherwise; the
maximum of a rigid displacement field over a convex region is attained at an extreme
point, so the corner case is exact for the box rather than a sample of it.
ncc: f64Normalised cross-correlation at the solution. 1.0 for the reference volume.
overlap: f64Fraction of sampled reference voxels that found a sample in this volume. 1.0 for the
reference volume.
suspect: boolThe estimate is not to be trusted: NCC below MotionParams::min_ncc, or overlap
below RigidParams::min_overlap.
Not a motion flag — a volume can move a long way and be registered perfectly, and that is
the normal case. This says the registration itself may have failed, so transform,
bdir and everything derived from them are questionable. Deciding what to do about a
volume whose data is corrupted — dropping it, downweighting it in an echo
combination — is a separate problem that belongs with [crate::utils::multi_echo]’s
weighting, and this module deliberately does not do it.
Trait Implementations§
Source§impl Clone for VolumeMotion
impl Clone for VolumeMotion
Source§fn clone(&self) -> VolumeMotion
fn clone(&self) -> VolumeMotion
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for VolumeMotion
impl RefUnwindSafe for VolumeMotion
impl Send for VolumeMotion
impl Sync for VolumeMotion
impl Unpin for VolumeMotion
impl UnsafeUnpin for VolumeMotion
impl UnwindSafe for VolumeMotion
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more