pub struct SciPyCompatLayer { /* private fields */ }Expand description
SciPy ndimage compatibility layer
Implementations§
Source§impl SciPyCompatLayer
impl SciPyCompatLayer
Sourcepub fn new(config: CompatibilityConfig) -> SciPyCompatLayer
pub fn new(config: CompatibilityConfig) -> SciPyCompatLayer
Create a new SciPy compatibility layer
Sourcepub fn default() -> SciPyCompatLayer
pub fn default() -> SciPyCompatLayer
Create with default configuration
Sourcepub fn get_warnings(&self) -> &[MigrationWarning]
pub fn get_warnings(&self) -> &[MigrationWarning]
Get migration warnings
Sourcepub fn clear_warnings(&mut self)
pub fn clear_warnings(&mut self)
Clear warnings
Source§impl SciPyCompatLayer
SciPy-compatible filter functions
impl SciPyCompatLayer
SciPy-compatible filter functions
Sourcepub fn gaussian_filter<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
sigma: SigmaParam,
order: Option<OrderParam>,
mode: Option<&str>,
cval: Option<f64>,
truncate: Option<f64>,
) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>
pub fn gaussian_filter<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, sigma: SigmaParam, order: Option<OrderParam>, mode: Option<&str>, cval: Option<f64>, truncate: Option<f64>, ) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>
Gaussian filter with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.gaussian_filter(input, sigma, order=0, output=None,
mode='reflect', cval=0.0, truncate=4.0)Sourcepub fn median_filter<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
size: Option<SizeParam>,
footprint: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
mode: Option<&str>,
cval: Option<f64>,
origin: Option<OriginParam>,
) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>where
T: Float + FromPrimitive + Debug + Clone + Send + Sync + PartialOrd + AddAssign + DivAssign + 'static,
pub fn median_filter<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
size: Option<SizeParam>,
footprint: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
mode: Option<&str>,
cval: Option<f64>,
origin: Option<OriginParam>,
) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>where
T: Float + FromPrimitive + Debug + Clone + Send + Sync + PartialOrd + AddAssign + DivAssign + 'static,
Median filter with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.median_filter(input, size=None, footprint=None, output=None,
mode='reflect', cval=0.0, origin=0)Sourcepub fn uniform_filter<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
size: Option<SizeParam>,
mode: Option<&str>,
cval: Option<f64>,
origin: Option<OriginParam>,
) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>
pub fn uniform_filter<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, size: Option<SizeParam>, mode: Option<&str>, cval: Option<f64>, origin: Option<OriginParam>, ) -> Result<ArrayBase<OwnedRepr<T>, Dim<[usize; 2]>>, NdimageError>
Uniform filter with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.uniform_filter(input, size=3, output=None, mode='reflect',
cval=0.0, origin=0)Source§impl SciPyCompatLayer
SciPy-compatible morphology functions
impl SciPyCompatLayer
SciPy-compatible morphology functions
Sourcepub fn binary_erosion<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
iterations: Option<usize>,
mask: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
border_value: Option<bool>,
origin: Option<OriginParam>,
brute_force: Option<bool>,
) -> Result<ArrayBase<OwnedRepr<bool>, Dim<[usize; 2]>>, NdimageError>
pub fn binary_erosion<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>, iterations: Option<usize>, mask: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>, border_value: Option<bool>, origin: Option<OriginParam>, brute_force: Option<bool>, ) -> Result<ArrayBase<OwnedRepr<bool>, Dim<[usize; 2]>>, NdimageError>
Binary erosion with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.binary_erosion(input, structure=None, iterations=1,
mask=None, output=None, border_value=0,
origin=0, brute_force=False)Sourcepub fn binary_dilation<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
iterations: Option<usize>,
mask: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
border_value: Option<bool>,
origin: Option<OriginParam>,
brute_force: Option<bool>,
) -> Result<ArrayBase<OwnedRepr<bool>, Dim<[usize; 2]>>, NdimageError>
pub fn binary_dilation<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>, iterations: Option<usize>, mask: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>, border_value: Option<bool>, origin: Option<OriginParam>, brute_force: Option<bool>, ) -> Result<ArrayBase<OwnedRepr<bool>, Dim<[usize; 2]>>, NdimageError>
Binary dilation with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.binary_dilation(input, structure=None, iterations=1,
mask=None, output=None, border_value=0,
origin=0, brute_force=False)Sourcepub fn distance_transform_edt<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
sampling: Option<SamplingParam>,
return_distances: Option<bool>,
return_indices: Option<bool>,
) -> Result<DistanceTransformResult<T>, NdimageError>
pub fn distance_transform_edt<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, sampling: Option<SamplingParam>, return_distances: Option<bool>, return_indices: Option<bool>, ) -> Result<DistanceTransformResult<T>, NdimageError>
Distance transform with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.distance_transform_edt(input, sampling=None, return_distances=True,
return_indices=False, distances=None, indices=None)Source§impl SciPyCompatLayer
SciPy-compatible measurement functions
impl SciPyCompatLayer
SciPy-compatible measurement functions
Sourcepub fn center_of_mass<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
labels: Option<ArrayBase<ViewRepr<&i32>, Dim<[usize; 2]>>>,
index: Option<IndexParam>,
) -> Result<CenterOfMassResult, NdimageError>
pub fn center_of_mass<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, labels: Option<ArrayBase<ViewRepr<&i32>, Dim<[usize; 2]>>>, index: Option<IndexParam>, ) -> Result<CenterOfMassResult, NdimageError>
Center of mass with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.center_of_mass(input, labels=None, index=None)Sourcepub fn label<T>(
&mut self,
input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>,
structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>,
) -> Result<LabelResult, NdimageError>
pub fn label<T>( &mut self, input: ArrayBase<ViewRepr<&T>, Dim<[usize; 2]>>, structure: Option<ArrayBase<ViewRepr<&bool>, Dim<[usize; 2]>>>, ) -> Result<LabelResult, NdimageError>
Label connected components with SciPy-compatible interface
# SciPy usage:
scipy.ndimage.label(input, structure=None, output=None)Auto Trait Implementations§
impl Freeze for SciPyCompatLayer
impl RefUnwindSafe for SciPyCompatLayer
impl Send for SciPyCompatLayer
impl Sync for SciPyCompatLayer
impl Unpin for SciPyCompatLayer
impl UnsafeUnpin for SciPyCompatLayer
impl UnwindSafe for SciPyCompatLayer
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
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Converts
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>
Converts
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.