pub struct ChiSepMediParams {
pub cf: f64,
pub lambda: f64,
pub lambda_csf: f64,
pub dr_pos: Option<f64>,
pub dr_neg: Option<f64>,
pub pad: usize,
pub tol: f64,
pub max_iter: usize,
pub cg_tol: f64,
pub cg_max_iter: usize,
}Expand description
Parameters for chi_sep_medi. The defaults are the toolbox’s (see the module docs).
Fields§
§cf: f64Central frequency in Hz (params.CF; default 123.2 MHz). The field strength the
defaults of Self::dr_pos and Self::dr_neg scale with is cf / 42.58e6.
lambda: f64Weight of the edge-masked L1 terms (params.lambda; default 1, as Chisep_script.m and
the toolbox GUI set it).
lambda_csf: f64Weight of the CSF term (params.lambda_CSF; default 1, as Chisep_script.m and the GUI
set it). Used only where ChiSepMediInputs::mask_csf has voxels.
dr_pos: Option<f64>Paramagnetic relaxometric constant in Hz/ppm (params.Dr_pos). None (the default):
the toolbox’s 137·(B0/2.9) (toolbox_default_dr).
dr_neg: Option<f64>Diamagnetic relaxometric constant in Hz/ppm (params.Dr_neg). None (the default): the
same as Self::dr_pos’s default.
pad: usizeZero padding, in voxels, added at both ends of the third axis only (params.pad_size;
default 5).
tol: f64Stop once the relative change of [χ+ |χ−|] in the eroded mask falls to this, after at
least CHI_SEP_MEDI_MIN_ITER iterations (params.tol_norm_ratio; default 0.03).
max_iter: usizeGauss-Newton iterations at most (params.max_iter; default 30).
cg_tol: f64Conjugate-gradient relative tolerance (params.cg_tol; default 0.05).
cg_max_iter: usizeConjugate-gradient iterations at most, per source and Gauss-Newton step
(params.cg_max_iter; default 100).
Implementations§
Source§impl ChiSepMediParams
impl ChiSepMediParams
Sourcepub fn dr(&self) -> (f64, f64)
pub fn dr(&self) -> (f64, f64)
The relaxometric constants used, (D_r,pos, D_r,neg) in Hz/ppm: the explicit values, or
the toolbox’s toolbox_default_dr.
Sourcepub fn validate(&self) -> Result<(), InputError>
pub fn validate(&self) -> Result<(), InputError>
Checks the parameters chi_sep_medi checks.
Trait Implementations§
Source§impl Clone for ChiSepMediParams
impl Clone for ChiSepMediParams
Source§fn clone(&self) -> ChiSepMediParams
fn clone(&self) -> ChiSepMediParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ChiSepMediParams
impl Debug for ChiSepMediParams
Source§impl Default for ChiSepMediParams
impl Default for ChiSepMediParams
Auto Trait Implementations§
impl Freeze for ChiSepMediParams
impl RefUnwindSafe for ChiSepMediParams
impl Send for ChiSepMediParams
impl Sync for ChiSepMediParams
impl Unpin for ChiSepMediParams
impl UnsafeUnpin for ChiSepMediParams
impl UnwindSafe for ChiSepMediParams
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