pub struct MultibandPipeline<T: Pod> { /* private fields */ }Expand description
Multi-band raster compute pipeline.
Implementations§
Source§impl<T: Pod + Zeroable> MultibandPipeline<T>
impl<T: Pod + Zeroable> MultibandPipeline<T>
Sourcepub fn new(context: &GpuContext, raster: &GpuRasterBuffer<T>) -> GpuResult<Self>
pub fn new(context: &GpuContext, raster: &GpuRasterBuffer<T>) -> GpuResult<Self>
Create a new multiband pipeline.
Sourcepub fn band(&self, index: usize) -> Option<&ComputePipeline<T>>
pub fn band(&self, index: usize) -> Option<&ComputePipeline<T>>
Get a specific band pipeline.
Sourcepub fn ndvi(self) -> GpuResult<ComputePipeline<T>>
pub fn ndvi(self) -> GpuResult<ComputePipeline<T>>
Compute NDVI (Normalized Difference Vegetation Index).
NDVI = (NIR - Red) / (NIR + Red)
§Errors
Returns an error if the raster doesn’t have at least 4 bands (R,G,B,NIR).
Auto Trait Implementations§
impl<T> Freeze for MultibandPipeline<T>
impl<T> !RefUnwindSafe for MultibandPipeline<T>
impl<T> Send for MultibandPipeline<T>where
T: Send,
impl<T> Sync for MultibandPipeline<T>where
T: Sync,
impl<T> Unpin for MultibandPipeline<T>where
T: Unpin,
impl<T> UnsafeUnpin for MultibandPipeline<T>
impl<T> !UnwindSafe for MultibandPipeline<T>
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