pub struct ChunkedImageProcessor { /* private fields */ }Expand description
Main processor for chunked image operations
Implementations§
Source§impl ChunkedImageProcessor
impl ChunkedImageProcessor
Sourcepub fn new(config: ChunkingConfig) -> Self
pub fn new(config: ChunkingConfig) -> Self
Create a new chunked image processor
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default configuration
Sourcepub fn calculate_chunk_size(
&self,
image_shape: (usize, usize),
element_size: usize,
) -> (usize, usize)
pub fn calculate_chunk_size( &self, image_shape: (usize, usize), element_size: usize, ) -> (usize, usize)
Calculate optimal chunk size based on image dimensions and config
Sourcepub fn calculate_overlap<T, Op>(&self, operation: &Op) -> usize
pub fn calculate_overlap<T, Op>(&self, operation: &Op) -> usize
Calculate required overlap for an operation
Sourcepub fn process<T, Op>(
&self,
input: &ArrayView2<'_, T>,
operation: &Op,
) -> NdimageResult<Array2<T>>where
T: Float + FromPrimitive + Debug + Clone + Send + Sync + Zero + 'static,
Op: ChunkOperation<T> + ?Sized,
pub fn process<T, Op>(
&self,
input: &ArrayView2<'_, T>,
operation: &Op,
) -> NdimageResult<Array2<T>>where
T: Float + FromPrimitive + Debug + Clone + Send + Sync + Zero + 'static,
Op: ChunkOperation<T> + ?Sized,
Process an image using a chunk operation
Sourcepub fn process_binary<Op>(
&self,
input: &ArrayView2<'_, bool>,
operation: &Op,
) -> NdimageResult<Array2<bool>>where
Op: BinaryChunkOperation,
pub fn process_binary<Op>(
&self,
input: &ArrayView2<'_, bool>,
operation: &Op,
) -> NdimageResult<Array2<bool>>where
Op: BinaryChunkOperation,
Process a binary image using a binary chunk operation
Sourcepub fn stats(&self) -> &ProcessingStats
pub fn stats(&self) -> &ProcessingStats
Get processing statistics
Sourcepub fn reset_stats(&self)
pub fn reset_stats(&self)
Reset processing statistics
Sourcepub fn gaussian_filter<T>(
&self,
input: &ArrayView2<'_, T>,
sigma: f64,
border_mode: Option<BorderMode>,
) -> NdimageResult<Array2<T>>
pub fn gaussian_filter<T>( &self, input: &ArrayView2<'_, T>, sigma: f64, border_mode: Option<BorderMode>, ) -> NdimageResult<Array2<T>>
Apply Gaussian filter in chunks
Sourcepub fn uniform_filter<T>(
&self,
input: &ArrayView2<'_, T>,
size: usize,
border_mode: Option<BorderMode>,
) -> NdimageResult<Array2<T>>
pub fn uniform_filter<T>( &self, input: &ArrayView2<'_, T>, size: usize, border_mode: Option<BorderMode>, ) -> NdimageResult<Array2<T>>
Apply uniform (box) filter in chunks
Sourcepub fn median_filter<T>(
&self,
input: &ArrayView2<'_, T>,
size: usize,
) -> NdimageResult<Array2<T>>
pub fn median_filter<T>( &self, input: &ArrayView2<'_, T>, size: usize, ) -> NdimageResult<Array2<T>>
Apply median filter in chunks
Sourcepub fn grey_erosion<T>(
&self,
input: &ArrayView2<'_, T>,
size: usize,
border_mode: Option<MorphBorderMode>,
) -> NdimageResult<Array2<T>>
pub fn grey_erosion<T>( &self, input: &ArrayView2<'_, T>, size: usize, border_mode: Option<MorphBorderMode>, ) -> NdimageResult<Array2<T>>
Apply morphological erosion in chunks
Sourcepub fn grey_dilation<T>(
&self,
input: &ArrayView2<'_, T>,
size: usize,
border_mode: Option<MorphBorderMode>,
) -> NdimageResult<Array2<T>>
pub fn grey_dilation<T>( &self, input: &ArrayView2<'_, T>, size: usize, border_mode: Option<MorphBorderMode>, ) -> NdimageResult<Array2<T>>
Apply morphological dilation in chunks
Auto Trait Implementations§
impl !Freeze for ChunkedImageProcessor
impl RefUnwindSafe for ChunkedImageProcessor
impl Send for ChunkedImageProcessor
impl Sync for ChunkedImageProcessor
impl Unpin for ChunkedImageProcessor
impl UnsafeUnpin for ChunkedImageProcessor
impl UnwindSafe for ChunkedImageProcessor
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
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
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.