pub struct VsharpParams {
pub threshold: f64,
pub max_radius: f64,
pub min_radius: f64,
pub radius_step: f64,
pub deconvolve: bool,
pub ball: VsharpBall,
pub grid: VsharpGrid,
}Expand description
V-SHARP algorithm parameters
Fields§
§threshold: f64Deconvolution (TSVD) threshold: k-space frequencies where |1 - S| < threshold are dropped
rather than divided through (default: 0.05, QSM.jl vsharp’s and QSM.m vsharp.m’s
thr; STI Suite does not deconvolve). Only used when deconvolve is
true. Higher values regularise more; 0.2 was QSM.rs’s tuned default before (see the
module docs, QSM.jl’s vsharp).
max_radius: f64Maximum (starting) SMV kernel radius in mm (default: 12.0, STI Suite’s V_SHARP
smvsize default, also what its QSM_GUI and the χ-separation toolbox pass)
min_radius: f64Smallest SMV kernel radius in mm (default: 2.0, STI Suite’s schedule; see
radius_step). Voxels where no ball of at least this radius fits
are dropped from the output mask.
radius_step: f64Step between successive radii in mm (default: 1.0). The radii are max_radius,
max_radius − radius_step, … down to min_radius, largest first; each voxel takes the
largest that fits.
The default schedule, 12, 11, …, 2 mm, is STI Suite’s V_SHARP: it computes balls for
r = 1 … smvsize mm in 1 mm steps (ascending, larger radii overwriting, so each voxel
ends with the largest ball that fits) and then drops the voxels where only r = 1 fits,
so the radii in effect are 2 … 12 mm (black-box probe, ukb-qsmxt
docs/08_vsharp_sti.md step 4). Before this parameter existed min_radius was also
the step, which cannot express that schedule; the previous default, 12 → 1 mm in 1 mm
steps, is min_radius: 1.0, radius_step: 1.0. The ball shape is ball.
Measured against 12 → 1 mm (no deconvolution, 1 mm grid, ROMEO field, then RTS): the output mask loses ~5 % of its voxels, all at the rim. On the voxels both keep, χ on the qsm-forward phantom is unchanged (XSIM 0.257 → 0.256, NRMSE 85.8 → 85.7 %); on an in-vivo 3T Philips scan its agreement with the UK Biobank pipeline’s χ (STI Suite V-SHARP + iLSQR) improves slightly, XSIM 0.704 → 0.714, NRMSE 70.4 → 69.4 %.
deconvolve: boolDeconvolve the SMV high-passed field by the largest kernel, 1/(1 − Ŝ) with TSVD at
threshold. Default false: return the high-passed field
φ − S_r∗φ itself, each voxel with the largest radius whose ball fits in the mask, as
the authors’ code (STI Suite’s V_SHARP) does. true is the papers’ description
(Li 2011, Wu 2012) as QSM.jl implements it. The deconvolution restores low spatial
frequencies that 1 − Ŝ attenuated; on real data those are dominated by residual
background and field-map error, so false is the more reproducible choice there, while
true recovers more low-frequency tissue contrast on a clean field (see the module
docs, Defaults).
ball: VsharpBallThe SMV ball (default VsharpBall::StiSuite, STI Suite’s V_SHARP). See the
module docs.
grid: VsharpGridGrid the background is estimated on (default: VsharpGrid::Isotropic at 1 mm, as
STI Suite’s V_SHARP resamples to 1 mm before filtering). See
VsharpParams::working_grid for the choice resolved on a given input.
VsharpGrid::Native avoids the interpolation and does not coarsen sub-millimetre
acquisitions’ background estimate (on 1 mm isotropic data the two agree up to the crop).
Implementations§
Source§impl VsharpParams
impl VsharpParams
Sourcepub fn validate(&self) -> Result<(), InputError>
pub fn validate(&self) -> Result<(), InputError>
Checks the parameters V-SHARP cannot run with: min_radius and radius_step must be
finite and > 0 — at a step of 0 the radius list never ends — and an
Isotropic working grid needs a spacing that is finite and > 0.
Sourcepub fn working_grid(&self, grid: &Grid) -> VsharpGrid
pub fn working_grid(&self, grid: &Grid) -> VsharpGrid
The working grid V-SHARP will use on grid: Self::grid resolved by
VsharpGrid::resolve; never VsharpGrid::IsotropicFinest.
Trait Implementations§
Source§impl Clone for VsharpParams
impl Clone for VsharpParams
Source§fn clone(&self) -> VsharpParams
fn clone(&self) -> VsharpParams
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 VsharpParams
impl Debug for VsharpParams
Source§impl Default for VsharpParams
impl Default for VsharpParams
Auto Trait Implementations§
impl Freeze for VsharpParams
impl RefUnwindSafe for VsharpParams
impl Send for VsharpParams
impl Sync for VsharpParams
impl Unpin for VsharpParams
impl UnsafeUnpin for VsharpParams
impl UnwindSafe for VsharpParams
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