pub struct NdiParams {
pub tau: f64,
pub alpha: f64,
pub max_iter: usize,
pub auto_stop: bool,
pub b0: f64,
pub echo_times: Vec<f64>,
pub te: EchoTime,
pub kernel: FansiKernel,
}Expand description
NDI algorithm parameters
Fields§
§tau: f64Gradient-descent step size
alpha: f64L2 regularization weight
max_iter: usizeNumber of iterations (the maximum, with auto_stop)
auto_stop: boolStop once the high-frequency energy of the estimate along the dipole cone exceeds that
just off it (FANSI ndi_auto.m)
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::First. FANSI’s
multi-echo example, script_DICOM_Philips.m, scales the field by deltaTE = TE(echo2) - TE(echo1) (FANSI-toolbox 93044a3, line 364) before ndi (lines 459, 465), and its comment
on that line says “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 at the first
echo gives the best NRMSE and r (0.635 / 52.0% / 0.854) against 0.636 / 54.0% / 0.842 at
the echo spacing. (With the continuous kernel, #276: 0.636 / 51.4% / 0.858 against
0.637 / 53.3% / 0.846.)
The magnitude weight is required, although ndi.m weights by ones when given none
(lines 51-56): with a flat weight NDI is worse on that phantom (0.625 / 58.8% / 0.818 at
the first echo, 0.630 / 57.3% / 0.825 at the spacing; continuous kernel 0.628 / 57.5% /
0.822 at the first echo).
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§
Auto Trait Implementations§
impl Freeze for NdiParams
impl RefUnwindSafe for NdiParams
impl Send for NdiParams
impl Sync for NdiParams
impl Unpin for NdiParams
impl UnsafeUnpin for NdiParams
impl UnwindSafe for NdiParams
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