aimsalgo  5.1.2
Neuroimaging image processing
aims::NearestNeighborResampler< T > Class Template Reference

Volume resampler using nearest-neighbour interpolation. More...

#include <aims/resampling/nearestneighborresampler.h>

Inheritance diagram for aims::NearestNeighborResampler< T >:
Collaboration diagram for aims::NearestNeighborResampler< T >:

Public Member Functions

 NearestNeighborResampler ()
 
 ~NearestNeighborResampler ()
 
- Public Member Functions inherited from aims::Resampler< T >
 Resampler ()
 
virtual ~Resampler ()
 
void setVerboseStream (std::ostream &stream)
 write verbose progress information to this stream. More...
 
void doit (const aims::AffineTransformation3d &transform, carto::Volume< T > &output_data) const
 Resample the input volume set with setRef() into an existing volume. More...
 
carto::VolumeRef< T > doit (const aims::AffineTransformation3d &transform, int dimX, int dimY, int dimZ, const Point3df &voxel_size) const
 Resample the input volume set with setRef() in a newly allocated volume. More...
 
virtual void resample (const carto::Volume< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, carto::Volume< T > &output_data, bool verbose=false) const
 Resample a volume into an existing output volume. More...
 
void resample (const carto::Volume< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
void resample_inv (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_mm, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
void resample_inv (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_mm, const T &background, carto::Volume< T > &output_data, bool verbose=false) const
 Resample a volume into an existing output volume. More...
 
void resample_inv_to_vox (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_vox, const T &background, const Point3df &output_location, T &output_value, int timestep) const
 Resample a volume at a single location. More...
 
virtual void resample_inv_to_vox (const carto::Volume< T > &input_data, const soma::Transformation3d &inverse_transform_to_vox, const T &background, carto::Volume< T > &output_data, bool verbose=false) const
 Resample a volume into an existing output volume. More...
 
void setRef (const carto::rc_ptr< carto::Volume< T > > &ref)
 Set the input data to be resampled by the doit() methods. More...
 
const carto::rc_ptr< carto::Volume< T > > & ref () const
 Input data to be resampled by the doit() methods. More...
 
void setDefaultValue (T val)
 Set the background value to be used by the doit() methods. More...
 
const T & defaultValue () const
 Background value used by the doit() methods. More...
 
- Public Member Functions inherited from carto::RCObject
 RCObject ()
 
 RCObject (const RCObject &)
 
RCObjectoperator= (const RCObject &)
 
virtual ~RCObject ()
 

Protected Member Functions

void doResample (const carto::Volume< T > &inVolume, const Point3df &inLocation, const T &outBackground, T &outValue, int t) const
 
void doResample (const carto::Volume< T > &inVolume, const soma::Transformation3d &transform3d, const T &outBackground, const Point3df &outLocation, T &outValue, int t) const CARTO_OVERRIDE
 Resample a volume at a single location. More...
 
- Protected Member Functions inherited from aims::Resampler< T >
virtual void updateParameters (const carto::Volume< T > &, int, bool) const
 Method called before doResample() for each time step. More...
 

Additional Inherited Members

- Public Types inherited from carto::RCObject
typedef int RefCounterType
 
- Protected Attributes inherited from aims::Resampler< T >
carto::rc_ptr< carto::Volume< T > > _ref
 
_defval
 
std::ostream * _verbose_stream
 

Detailed Description

template<class T>
class aims::NearestNeighborResampler< T >

Volume resampler using nearest-neighbour interpolation.

The resampling API is described in the base class, Resampler.

Definition at line 48 of file nearestneighborresampler.h.

Constructor & Destructor Documentation

◆ NearestNeighborResampler()

template<class T >
aims::NearestNeighborResampler< T >::NearestNeighborResampler ( )
inline

Definition at line 52 of file nearestneighborresampler.h.

◆ ~NearestNeighborResampler()

template<class T >
aims::NearestNeighborResampler< T >::~NearestNeighborResampler ( )
inline

Definition at line 53 of file nearestneighborresampler.h.

Member Function Documentation

◆ doResample() [1/2]

template<class T >
void aims::NearestNeighborResampler< T >::doResample ( const carto::Volume< T > &  inVolume,
const Point3df inLocation,
const T &  outBackground,
T &  outValue,
int  t 
) const
protected

◆ doResample() [2/2]

template<class T >
void aims::NearestNeighborResampler< T >::doResample ( const carto::Volume< T > &  input_data,
const soma::Transformation3d inverse_transform,
const T &  background,
const Point3df output_location,
T &  output_value,
int  timestep 
) const
protectedvirtual

Resample a volume at a single location.

Parameters
[in]input_datadata to be resampled (its voxel size is not* taken into account)
[in]inverse_transformtransformation from output coordinates to coordinates of the input volume (unit: voxels)
[in]backgroundvalue set if the transformed point is outside of the input volume
[in]output_locationcoordinates in output space (source space of transform)
[out]output_valuevariable to be filled with resampled data
[in]timestepfor 4D volume, time step to be used

Implements aims::Resampler< T >.

Definition at line 49 of file nearestneighborresampler_d.h.

References soma::Transformation3d::transform().


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