SIRF  3.4.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
sirf::Resampler< dataType > Class Template Referenceabstract
Inheritance diagram for sirf::Resampler< dataType >:
sirf::NiftyResampler< dataType > sirf::NiftyResampler< dataType >

Public Types

enum  InterpolationType {
  NOTSET = -1, NEARESTNEIGHBOUR = 0, LINEAR = 1, CUBICSPLINE = 3,
  SINC = 4
}
 Interpolation type.
 

Public Member Functions

 Resampler ()
 Constructor.
 
virtual ~Resampler ()
 Destructor.
 
virtual void set_reference_image (const std::shared_ptr< const ImageData > reference_image_sptr)
 Set reference image. This is the image that would be the reference if you were doing a forward transformation. More...
 
virtual void set_floating_image (const std::shared_ptr< const ImageData > floating_image_sptr)
 Set floating image. This is the image that would be the floating if you were doing a forward transformation. More...
 
virtual void add_transformation (const std::shared_ptr< const Transformation< dataType > > transformation_sptr)
 Add transformation.
 
void clear_transformations ()
 Clear transformations.
 
virtual void set_interpolation_type (const enum InterpolationType type)
 Set interpolation type (0=nearest neighbour, 1=linear, 3=cubic, 4=sinc)
 
void set_interpolation_type_to_nearest_neighbour ()
 Set interpolation type to nearest neighbour.
 
void set_interpolation_type_to_linear ()
 Set interpolation type to linear.
 
void set_interpolation_type_to_cubic_spline ()
 Set interpolation type to cubic spline.
 
void set_interpolation_type_to_sinc ()
 Set interpolation type to sinc.
 
const InterpolationType get_interpolation_type () const
 Get interpolation type.
 
void set_padding_value (const float padding_value)
 Set padding value.
 
virtual void process ()=0
 Process. Equivalent of calling forward(floating_image). Use get_output to get resampled image.
 
const std::shared_ptr< const ImageDataget_output_sptr () const
 Get output.
 
virtual std::shared_ptr< ImageDataforward (const std::shared_ptr< const ImageData > input_sptr)=0
 Do the forward transformation.
 
virtual void forward (std::shared_ptr< ImageData > output_sptr, const std::shared_ptr< const ImageData > input_sptr)=0
 Do the forward transformation.
 
virtual std::shared_ptr< ImageDataadjoint (const std::shared_ptr< const ImageData > input_sptr)=0
 Do the adjoint transformation.
 
virtual void adjoint (std::shared_ptr< ImageData > output_sptr, const std::shared_ptr< const ImageData > input_sptr)=0
 Do the adjoint transformation.
 
virtual std::shared_ptr< ImageDatabackward (const std::shared_ptr< const ImageData > input_sptr)
 Backward. Alias for Adjoint.
 
virtual void backward (std::shared_ptr< ImageData > output_sptr, const std::shared_ptr< const ImageData > input_sptr)
 Backward. Alias for Adjoint.
 

Protected Member Functions

virtual void set_up ()=0
 Set up.
 
virtual void set_up_forward ()=0
 Set up forward.
 
virtual void set_up_adjoint ()=0
 Set up adjoint.
 
virtual void check_parameters ()
 Check parameters.
 

Protected Attributes

std::shared_ptr< const ImageData_reference_image_sptr
 Reference image.
 
std::shared_ptr< const ImageData_floating_image_sptr
 Floating image.
 
std::vector< std::shared_ptr< const Transformation< dataType > > > _transformations
 Transformations (could be mixture of affine, displacements, deformations).
 
InterpolationType _interpolation_type
 Interpolation type.
 
std::shared_ptr< ImageData_output_image_sptr
 Output image.
 
float _padding_value = 0
 Padding value.
 
bool _need_to_set_up = true
 
bool _need_to_set_up_forward = true
 
bool _need_to_set_up_adjoint = true
 

Member Function Documentation

◆ set_floating_image()

template<class dataType >
void Resampler::set_floating_image ( const std::shared_ptr< const ImageData floating_image_sptr)
virtual

Set floating image. This is the image that would be the floating if you were doing a forward transformation.

Set floating image.

◆ set_reference_image()

template<class dataType >
void Resampler::set_reference_image ( const std::shared_ptr< const ImageData reference_image_sptr)
virtual

Set reference image. This is the image that would be the reference if you were doing a forward transformation.

Set reference image.


The documentation for this class was generated from the following files: