pub struct FansiParams {}Expand description
FANSI nlTV/nlTGV parameters (nlTV.m / nlTGV.m defaults where they have them).
Fields§
§alpha1: f64First-order (TV / TGV gradient) L1 penalty weight.
mu1: Option<f64>Gradient-consistency ADMM weight; None is FANSI’s 100 * alpha1.
mu2: f64Fidelity-consistency ADMM weight.
alpha0: Option<f64>Second-order (symmetric-gradient) L1 penalty weight (nlTGV only); None is
nlTGV.m’s 2 * alpha1.
mu0: Option<f64>Second-order consistency ADMM weight (nlTGV only); None is nlTGV.m’s 2 * mu1.
max_iter: usizeNumber of outer ADMM iterations.
tol_update: f64Percent-update convergence stopping tolerance.
tol_delta: f64Inner Newton convergence tolerance.
b0: f64Field strength in Tesla (scan parameter, for the radian conversion)
echo_times: Vec<f64>Echo times in seconds, in acquisition order (scan parameter, for the radian conversion).
te: EchoTimeWhich echo time the radian conversion uses. Default EchoTime::Spacing: FANSI’s
multi-echo example, script_DICOM_Philips.m, scales the field to radians by deltaTE = TE(echo2) - TE(echo1) (FANSI-toolbox 93044a3, line 364) before nlTV/nlTGV (lines 370,
421). That script’s echo1 = 2, echo2 = 4 (lines 224-225) make it twice the spacing of
its evenly spaced echoes; its comment adds “You may use also any individual echo time”.
On the qsm-forward phantom (echoes 4/12/20/28 ms; FANSI’s discrete kernel, measured for QSM.rs#418 with the integration tests’ settings; XSIM / NRMSE / r), the
magnitude weight does better at the echo spacing than at the first echo on every metric:
nlTV 0.801 / 40.7% / 0.914 vs 0.799 / 43.6% / 0.901, nlTGV (50 iterations) 0.768 / 41.0% /
0.912 vs 0.767 / 43.0% / 0.903. (With the continuous kernel, #276: nlTV 0.802 / 39.8% /
0.918 vs 0.797 / 43.0% / 0.903, nlTGV 0.767 / 40.1% / 0.916 vs 0.765 / 42.8% / 0.904.)
The magnitude weight is required, although nlTV.m and nlTGV.m weight by ones when
given none (nlTV.m lines 213, 274; nlTGV.m lines 350, 365): with a flat weight both
diverge on that phantom at either echo time, with either kernel.
is_tgv: boolSelect nlTGV (true) or nlTV (false).
kernel: FansiKernelThe dipole kernel. Default FansiKernel::Discrete, FANSI’s
dipole_kernel_angulated as the original is run with; FansiKernel::Continuous is
the crate’s continuous kernel (see FansiKernel for the decision and the measurements).
Implementations§
Trait Implementations§
Source§impl Clone for FansiParams
impl Clone for FansiParams
Source§fn clone(&self) -> FansiParams
fn clone(&self) -> FansiParams
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 FansiParams
impl Debug for FansiParams
Source§impl Default for FansiParams
impl Default for FansiParams
Auto Trait Implementations§
impl Freeze for FansiParams
impl RefUnwindSafe for FansiParams
impl Send for FansiParams
impl Sync for FansiParams
impl Unpin for FansiParams
impl UnsafeUnpin for FansiParams
impl UnwindSafe for FansiParams
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