pub enum MaskOp {
Threshold {
method: MaskThresholdMethod,
value: Option<f64>,
},
Bet(BetParams),
Erode {
iterations: usize,
},
Dilate {
iterations: usize,
},
Close {
radius: usize,
},
FillHoles {
max_size: usize,
},
GaussianSmooth {
sigma_mm: f64,
},
SignalErode(SignalErosionParams),
HdBet(HdBetParams),
Rs2Net(Rs2NetParams),
MindGrab(MindGrabParams),
}Expand description
A single mask operation (generator or refinement)
Variants§
Threshold
Bet(BetParams)
BET brain extraction from the magnitude (a generator), with the full
BetParams — fractional intensity, smoothness, gradient
threshold, iterations, subdivisions and voxel scale. BetParams::default() is FSL’s
defaults on the acquisition’s own geometry.
Erode
Dilate
Close
FillHoles
GaussianSmooth
SignalErode(SignalErosionParams)
Signal-gated erosion: peel only low-signal boundary voxels (skull-base / sinus dropout)
down to a depth cap. See crate::utils::morphology::signal_gated_erosion.
Gates on the magnitude image, never on the section’s input: it divides out a receive-coil bias estimate and compares against the in-mask median, which only means anything for magnitude. Errors if no magnitude is supplied, so a phase-quality mask input can still be refined with it as long as the magnitude is available.
HdBet(HdBetParams)
HD-BET deep-learning brain extraction from the magnitude (a generator, like Bet),
whatever the section’s input is. Requires the onnx feature and the hd-bet model
weights; see crate::models.
Rs2Net(Rs2NetParams)
RS2-Net deep-learning rodent brain extraction from the magnitude (a generator,
like HdBet). Requires the onnx feature and the rs2-net model weights; see
crate::models.
MindGrab(MindGrabParams)
MindGrab deep-learning brain extraction from the magnitude (a generator, like
HdBet), for any contrast. Needs ScanMetadata::affine, the onnx feature and the
mindgrab model weights; see crate::models.
Implementations§
Trait Implementations§
impl StructuralPartialEq for MaskOp
Auto Trait Implementations§
impl Freeze for MaskOp
impl RefUnwindSafe for MaskOp
impl Send for MaskOp
impl Sync for MaskOp
impl Unpin for MaskOp
impl UnsafeUnpin for MaskOp
impl UnwindSafe for MaskOp
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