pub struct HdQsmParams {
pub alpha_l2: f64,
pub mu1_l2: Option<f64>,
pub mu2: f64,
pub max_iter_l1: usize,
pub max_iter_l2: usize,
pub tol_update: f64,
pub kernel: FansiKernel,
}Expand description
HD-QSM algorithm parameters.
Fields§
§alpha_l2: f64L2-stage TV weight, for a field in ppm and the magnitude weight (default 3e-5).
HDQSM.m requires it and gives no default; its example uses 10^-4.785 (1.6e-5) and the paper’s 2019-challenge reconstructions 6.3e-6, both on simulated data. 3e-5 was chosen from a sweep (1e-6 to 1e-4) on the 2016 challenge (COSMOS reference: best correlation, 0.76, NRMSE 73%), the 2019-style simulation (NRMSE 39%) and ten travelling-head scans (stable on all of them, with less noise than the mask-weighted 1e-4 the port used).
mu1_l2: Option<f64>L2-stage gradient-consistency ADMM weight; None is 100 * alpha_l2.
The paper ties it to alpha_l2 with 10 <= mu1_l2/alpha_l2 <= 100; HDQSM.m’s example and the paper’s challenge reconstructions use 10. On in vivo travelling-head scans the ADMM diverges (in HDQSM.m as well) once mu1_l2 falls to about 3e-4 or below, which a ratio of 10 reaches at the alpha_l2 that suits in vivo data, so the default uses the paper’s 100.
mu2: f64Fidelity consistency weight (HDQSM.m mu2L1, default 1.0).
max_iter_l1: usizeStage-1 (L1) iterations (HDQSM.m maxOuterIterL1, default 20).
max_iter_l2: usizeStage-2 (L2) iterations (HDQSM.m maxOuterIterL2, default 80).
tol_update: f64Stage-2 percent-update stopping tolerance (HDQSM.m tol_update, default 1e-2).
kernel: FansiKernelThe dipole kernel. Default FansiKernel::Discrete, FANSI’s
dipole_kernel_angulated as the QSM-CI original is run with (HDQSM.m ships no kernel); FansiKernel::Continuous is
the crate’s continuous kernel (see FansiKernel for the decision and the measurements).
Trait Implementations§
Source§impl Clone for HdQsmParams
impl Clone for HdQsmParams
Source§fn clone(&self) -> HdQsmParams
fn clone(&self) -> HdQsmParams
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 HdQsmParams
impl Debug for HdQsmParams
Source§impl Default for HdQsmParams
impl Default for HdQsmParams
Auto Trait Implementations§
impl Freeze for HdQsmParams
impl RefUnwindSafe for HdQsmParams
impl Send for HdQsmParams
impl Sync for HdQsmParams
impl Unpin for HdQsmParams
impl UnsafeUnpin for HdQsmParams
impl UnwindSafe for HdQsmParams
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