pub struct ChiSepMediInputs<'a> {
pub magnitude: &'a [f64],
pub local_field: &'a [f64],
pub r2prime: &'a [f64],
pub n_std: &'a [f64],
pub qsm: &'a [f64],
pub mask: &'a [u8],
pub mask_csf: &'a [u8],
}Expand description
The volumes chi_sep_medi takes, as chi_sep_MEDI(mag, local_field_hz, r2prime, N_std, mask, params, option_data) takes them. All are on the grid, column-major.
Fields§
§magnitude: &'a [f64]Magnitude (mag; Chisep_script.m passes the root-sum-of-squares over echoes). Only its
edges are used (MEDI’s gradient_mask).
local_field: &'a [f64]Local field in ppm (the toolbox takes it in Hz; converted with ChiSepMediParams::cf).
r2prime: &'a [f64]R2′ in Hz (r2prime).
n_std: &'a [f64]Noise standard deviation of the field (N_std); the data weights are mask/N_std
normalised to mean 1, so only its relative values matter. The toolbox (script and GUI)
passes MEDI Fit_ppm_complex‘s dp1 from the echoes’ magnitudes,
crate::utils::fit_ppm_complex_noise.
qsm: &'a [f64]Conventional QSM in ppm (option_data.qsm), the initial guess.
mask: &'a [u8]Brain mask (mask), nonzero inside.
mask_csf: &'a [u8]CSF mask (option_data.mask_CSF), nonzero inside; required, as Chisep_script.m passes
one. All zero: no CSF term, which reproduces the toolbox GUI (mask_CSF = []).
Trait Implementations§
Source§impl<'a> Clone for ChiSepMediInputs<'a>
impl<'a> Clone for ChiSepMediInputs<'a>
Source§fn clone(&self) -> ChiSepMediInputs<'a>
fn clone(&self) -> ChiSepMediInputs<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl<'a> Copy for ChiSepMediInputs<'a>
Auto Trait Implementations§
impl<'a> Freeze for ChiSepMediInputs<'a>
impl<'a> RefUnwindSafe for ChiSepMediInputs<'a>
impl<'a> Send for ChiSepMediInputs<'a>
impl<'a> Sync for ChiSepMediInputs<'a>
impl<'a> Unpin for ChiSepMediInputs<'a>
impl<'a> UnsafeUnpin for ChiSepMediInputs<'a>
impl<'a> UnwindSafe for ChiSepMediInputs<'a>
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