pub struct HeidiParams {Show 13 fields
pub cone_threshold: f64,
pub gradient_threshold: f64,
pub apply_laplacian_correction: bool,
pub laplacian_threshold: f64,
pub denoise: Option<AnisotropicDiffusionParams>,
pub gradient_mask_floor: f64,
pub continuation_steps: usize,
pub inner_iterations: usize,
pub mu_min: f64,
pub tol: f64,
pub b0: f64,
pub echo_times: Vec<f64>,
pub te: EchoTime,
}Expand description
Parameters for heidi.
Fields§
§cone_threshold: f64|D(k)| above which a coefficient counts as well-conditioned and is taken
from chi_init unchanged.
gradient_threshold: f64Field-gradient threshold in ppm/mm. Below it, a direction is considered homogeneous and its TV weight is switched on.
apply_laplacian_correction: boolOpen the homogeneity masks where the field’s Laplacian is large.
laplacian_threshold: f64Field-Laplacian threshold in ppm per voxel² (the stencil is in voxel units, matching upstream).
denoise: Option<AnisotropicDiffusionParams>Anisotropic-diffusion smoothing applied to the field (in upstream’s phase units) before
the gradients are taken. None skips it. Its reference_itk reproduces the ITK
executable upstream runs (see the module docs).
gradient_mask_floor: f64TV weight kept at voxels that read as an edge in every direction.
The default, 0, is what the shipped code does: computesusceptibility_heidi sets
these voxels to gradientMaskReplaceValue (0.1) and then passes the masks through
fourierbasedresize(...) > 0.5, which rounds the 0.1 away. (Its changelog, v10.6,
says the masks “must contain values of 0.1”; set 0.1 to follow that instead.)
continuation_steps: usizeNESTA continuation steps on μ.
This is the dominant quality knob, and more is not better. μ always lands
on mu_min, so the count controls how many levels of TV minimisation are
actually performed — past the first couple of levels μ is already far
below the field’s gradient scale and the term is effectively pure TV, so
extra levels just keep flattening. On the CI phantom, at otherwise-default
settings: 4 steps → r=0.8984, 6 → r=0.9017, 8 (upstream’s
DEFAULT_TV_MAXINTITER, kept here) → r=0.8757. Worth sweeping on your own
data before trusting the default.
inner_iterations: usizeAccelerated-gradient iterations per continuation step.
mu_min: f64Final (smallest) smoothing parameter μ.
tol: f64Relative objective change that ends an inner loop early.
The driver inversion_heidi.m sets PostProcCone.tol = eps, which never
triggers: every continuation step runs all inner_iterations.
(computesusceptibility_heidi’s own default, used when the driver sets none, is
DEFAULT_TV_TOLVAR = 1e-3.)
b0: f64Field strength in tesla (scan parameter, for the conversion to upstream’s units)
echo_times: Vec<f64>Echo times in seconds, in acquisition order (scan parameter, for the conversion to upstream’s units).
te: EchoTimeWhich echo time the field stands for the phase of, in the conversion to upstream’s units. Default EchoTime::Last: qsm_heidi’s
phase2susceptibilityfactor.m uses the last echo time unless an echo is named
(heidi/phase2susceptibilityfactor.m lines 70-71, qsm_heidi 4592631), and
inversion_heidi.m names none (line 58).
Trait Implementations§
Source§impl Clone for HeidiParams
impl Clone for HeidiParams
Source§fn clone(&self) -> HeidiParams
fn clone(&self) -> HeidiParams
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 HeidiParams
impl Debug for HeidiParams
Auto Trait Implementations§
impl Freeze for HeidiParams
impl RefUnwindSafe for HeidiParams
impl Send for HeidiParams
impl Sync for HeidiParams
impl Unpin for HeidiParams
impl UnsafeUnpin for HeidiParams
impl UnwindSafe for HeidiParams
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