pub struct ImageFilterLut { /* private fields */ }Expand description
Image filter weight lookup table.
Stores precomputed filter weights at subpixel resolution for fast image resampling. Weights are stored as 14-bit fixed-point integers.
Port of C++ image_filter_lut.
Implementations§
Source§impl ImageFilterLut
impl ImageFilterLut
Sourcepub fn new_with_filter<F: ImageFilterFunction>(
filter: &F,
normalization: bool,
) -> Self
pub fn new_with_filter<F: ImageFilterFunction>( filter: &F, normalization: bool, ) -> Self
Create and populate a filter LUT from a filter function.
pub fn radius(&self) -> f64
pub fn diameter(&self) -> u32
pub fn start(&self) -> i32
pub fn weight_array(&self) -> &[i16]
Sourcepub fn calculate<F: ImageFilterFunction>(
&mut self,
filter: &F,
normalization: bool,
)
pub fn calculate<F: ImageFilterFunction>( &mut self, filter: &F, normalization: bool, )
Populate the LUT from a filter function.
Port of C++ image_filter_lut::calculate.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImageFilterLut
impl RefUnwindSafe for ImageFilterLut
impl Send for ImageFilterLut
impl Sync for ImageFilterLut
impl Unpin for ImageFilterLut
impl UnwindSafe for ImageFilterLut
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