Skip to main content

Resampleable

Trait Resampleable 

Source
pub trait Resampleable<B, const D: usize>
where B: Backend,
{ // Required method fn resample( &self, shape: [usize; D], origin: Point<D>, spacing: Spacing<D>, direction: Direction<D>, ) -> Self; }
Expand description

Trait for transforms that can be resampled to a new grid/resolution.

This is used in multi-resolution registration to adapt the transform (e.g., displacement field) when moving from coarse to fine levels.

Required Methods§

Source

fn resample( &self, shape: [usize; D], origin: Point<D>, spacing: Spacing<D>, direction: Direction<D>, ) -> Self

Resample the transform to match a new image grid.

§Arguments
  • shape - The new image shape
  • origin - The new image origin
  • spacing - The new image spacing
  • direction - The new image direction
§Returns

A new instance of the transform adapted to the new grid.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B: Backend + BackendOps<f32>, const D: usize> Resampleable<B, D> for AffineTransform<B, D>

Source§

impl<B: Backend + BackendOps<f32>, const D: usize> Resampleable<B, D> for RigidTransform<B, D>

Source§

impl<B: Backend + BackendOps<f32>, const D: usize> Resampleable<B, D> for TranslationTransform<B, D>