pub struct MotionCorrectionResult {
pub phases: Vec<Vec<f64>>,
pub magnitudes: Vec<Vec<f64>>,
pub mask: Vec<u8>,
pub bdirs: Vec<(f64, f64, f64)>,
pub motion: MotionSeries,
}Expand description
A motion-corrected echo series, ready for super::run_field_mapping.
Fields§
§phases: Vec<Vec<f64>>Per-echo wrapped phase on the reference echo’s grid, moved through the complex domain so the wraps survived.
magnitudes: Vec<Vec<f64>>Per-echo magnitude on the reference echo’s grid.
mask: Vec<u8>The input mask restricted to voxels every echo still reaches after being moved.
A rotated echo cannot fill the whole reference grid, and a resampled volume is zero where it does not reach. Those zeros are absence of data, not a zero measurement, and feeding them to an unwrapper as if they were brain is how a rim of nonsense gets into a field map. Pass this mask downstream, not the one handed in.
bdirs: Vec<(f64, f64, f64)>Each echo’s B0 direction in the reference echo’s voxel frame. See the module docs on why these differ and what that costs.
motion: MotionSeriesThe motion that was estimated, for reporting and for the suspect flags.
Implementations§
Source§impl MotionCorrectionResult
impl MotionCorrectionResult
Sourcepub fn rotation_spread_deg(&self) -> f64
pub fn rotation_spread_deg(&self) -> f64
Angle between the extreme B0 directions in the series, in degrees — how far from a single dipole-kernel orientation this series actually is.
Sourcepub fn max_displacement_mm(&self) -> f64
pub fn max_displacement_mm(&self) -> f64
Largest distance any brain tissue moved during the series, in mm. Compare it against the voxel size: below one voxel the correction had nothing to do.
Auto Trait Implementations§
impl Freeze for MotionCorrectionResult
impl RefUnwindSafe for MotionCorrectionResult
impl Send for MotionCorrectionResult
impl Sync for MotionCorrectionResult
impl Unpin for MotionCorrectionResult
impl UnsafeUnpin for MotionCorrectionResult
impl UnwindSafe for MotionCorrectionResult
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> 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