A.I.M.S algorithms


Resampler< T > Class Template Referenceabstract

Resampler resamples an input data to build or fill an output data, using an affine transformation. More...

#include <aims/resampling/resampler.h>

Inheritance diagram for Resampler< T >:
Collaboration diagram for Resampler< T >:

Public Member Functions

 Resampler ()
 
virtual ~Resampler ()
 
virtual void doit (const aims::AffineTransformation3d &transform, AimsData< T > &output_data)
 Resample the reference input data (set via setRef()) into an existing output data. More...
 
virtual AimsData< T > doit (const aims::AffineTransformation3d &transform, int dimX, int dimY, int dimZ, const Point3df &voxel_size)
 Resample the reference input data (set via setRef()) into a new output data. More...
 
virtual void resample (const AimsData< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, AimsData< T > &output_data, bool verbose=false)
 Resample the input data into an existing output data. More...
 
virtual void resample (const AimsData< T > &input_data, const aims::AffineTransformation3d &transform, const T &background, const Point3df &output_location, T &output_value, int timestep)
 Resample a single voxel of the input data at a given specified output location, and set the output value. More...
 
void setRef (const AimsData< T > &ref)
 set the input data to be resampled More...
 
void setDefaultValue (T val)
 set the default background value More...
 

Protected Member Functions

virtual void doResample (const AimsData< T > &inVolume, const aims::AffineTransformation3d &invTransform3d, const T &outBackground, const Point3df &outLocation, T &outValue, int time)=0
 
virtual void updateParameters (const AimsData< T > &inVolume, int time, bool verbose)
 called before each time step, used in spline resamplers More...
 

Protected Attributes

const AimsData< T > * _ref
 
_defval
 

Detailed Description

template<class T>
class Resampler< T >

Resampler resamples an input data to build or fill an output data, using an affine transformation.

Normally the input data should be set in the resampler using setRef().

Resampling is done using the doit() methods. resample() methods also provide alternatives.

Definition at line 52 of file resampler.h.

Constructor & Destructor Documentation

template<class T>
Resampler< T >::Resampler ( )
inline

Definition at line 56 of file resampler.h.

template<class T>
virtual Resampler< T >::~Resampler ( )
inlinevirtual

Definition at line 57 of file resampler.h.

Member Function Documentation

template<typename T>
void Resampler< T >::doit ( const aims::AffineTransformation3d transform,
AimsData< T > &  output_data 
)
virtual

Resample the reference input data (set via setRef()) into an existing output data.

Parameters:

transform: AffineTransformation3d transformation to apply output_data: AimsData<T> resampled data will fill this existing output data

Reimplemented in MaskLinearResampler< T >.

Definition at line 169 of file resampler_d.h.

References carto::verbose.

Referenced by BlockMatching< T >::doit(), and aims::RoiStats::populate().

template<typename T>
AimsData< T > Resampler< T >::doit ( const aims::AffineTransformation3d transform,
int  dimX,
int  dimY,
int  dimZ,
const Point3df voxel_size 
)
virtual
template<class T>
virtual void Resampler< T >::doResample ( const AimsData< T > &  inVolume,
const aims::AffineTransformation3d invTransform3d,
const T &  outBackground,
const Point3df outLocation,
T &  outValue,
int  time 
)
protectedpure virtual
template<typename T>
void Resampler< T >::resample ( const AimsData< T > &  input_data,
const aims::AffineTransformation3d transform,
const T &  background,
AimsData< T > &  output_data,
bool  verbose = false 
)
virtual

Resample the input data into an existing output data.

Parameters:

input_data: data to be resampled transform: transformation to apply background: value set in output regions which are outside of the transformation space of the input volume output_data: resampled data will fill this existing output data verbose: print more things during resampling

Definition at line 45 of file resampler_d.h.

References AimsData< T >::dimT(), AimsData< T >::dimX(), AimsData< T >::dimY(), AimsData< T >::dimZ(), aims::AffineTransformation3d::inverse(), aims::AffineTransformation3d::scale(), AimsData< T >::sizeX(), AimsData< T >::sizeY(), and AimsData< T >::sizeZ().

template<typename T>
void Resampler< T >::resample ( const AimsData< T > &  input_data,
const aims::AffineTransformation3d transform,
const T &  background,
const Point3df output_location,
T &  output_value,
int  timestep 
)
virtual

Resample a single voxel of the input data at a given specified output location, and set the output value.

Parameters:

input_data: data to be resampled transform: transformation to apply background: value set in output regions which are outside of the transformation space of the input volume output_location: position in the output space (warning, this is actually an input) output_value: resampled output value timestep: for 4D volume, time step to be used

Definition at line 137 of file resampler_d.h.

References aims::AffineTransformation3d::inverse(), aims::AffineTransformation3d::scale(), AimsData< T >::sizeX(), AimsData< T >::sizeY(), and AimsData< T >::sizeZ().

template<class T>
void Resampler< T >::setDefaultValue ( val)
inline

set the default background value

Definition at line 127 of file resampler.h.

template<class T>
void Resampler< T >::setRef ( const AimsData< T > &  ref)
inline

set the input data to be resampled

Definition at line 125 of file resampler.h.

Referenced by BlockMatching< T >::doit(), and aims::RoiStats::populate().

template<typename T>
void Resampler< T >::updateParameters ( const AimsData< T > &  inVolume,
int  time,
bool  verbose 
)
protectedvirtual

called before each time step, used in spline resamplers

Reimplemented in SplineResampler< T >, and SplineResampler< C >.

Definition at line 162 of file resampler_d.h.

Member Data Documentation

template<class T>
T Resampler< T >::_defval
protected

Definition at line 142 of file resampler.h.

Referenced by Resampler< C >::setDefaultValue().

template<class T>
const AimsData<T>* Resampler< T >::_ref
protected

Definition at line 141 of file resampler.h.

Referenced by Resampler< C >::setRef().


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