Public Member Functions | Protected Member Functions | List of all members
mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain > Struct Template Reference

#include <MultipleVoxelTransformation.h>

Inheritance diagram for mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >:
Inheritance graph
Collaboration diagram for mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >:
Collaboration graph

Public Member Functions

void ApplyDisplacement (const double *disp1)
 
void ApplyDisplacementAndTransformation (const double *disp1)
 
void ApplyDisplacements (const double *disp1, const double *disp2)
 
void ApplyTransformation ()
 
void ApplyTransformations ()
 Transform using fluid composition of transformations.
 
InterpolateImageFunctionGetInterpolator (int n)
 Get (casted) pointer to interpolator of type InterpolateImageFunction.
 
InterpolateImageFunctionGetInterpolator ()
 Get (casted) pointer to reference interpolator of type InterpolateImageFunction.
 
void InterpolatePut (int i, int j, int k, double *)
 
template<class OutputVoxelType >
void InterpolatePut (int i, int j, int k, OutputVoxelType *)
 
void InterpolatePutAsDouble (int i, int j, int k)
 
template<class OutputVoxelType >
void InterpolateRescalePut (int i, int j, int k, OutputVoxelType *)
 
void InterpolateRescalePutAsDouble (int i, int j, int k)
 
void OutputToWorld (int i, int j, int k)
 Convert output voxel indices to world coordinates.
 
void OutputToWorld (const double *i2w)
 Convert output voxel indices to world coordinates given pointer to lookup table.
 
template<class OutputVoxelType >
void PutOutsideValue (int i, int j, int k)
 
void PutOutsideValueAsDouble (int i, int j, int k)
 
void PutVoxelTransformation (int i, int j, int k, double *o2i)
 Update map from output to input voxel indices with inside check.
 
void WorldToInput ()
 Convert world coordinates to input voxel indices.
 
virtual ~BaseTransform ()
 Destructor.
 
- Public Member Functions inherited from mirtk::MultipleVoxelTransformation::TransformData
 TransformData ()
 Default constructor.
 
- Public Member Functions inherited from mirtk::MultipleVoxelTransformation::Base
template<class T >
T & x_ (T *p) const
 Get reference to x component of vector field.
 
template<class T >
const T & x_ (const T *p) const
 Get const reference to x component of vector field.
 
template<class T >
T & y_ (T *p) const
 Get reference to y component of vector field.
 
template<class T >
const T & y_ (const T *p) const
 Get const reference to y component of vector field.
 
template<class T >
T & z_ (T *p) const
 Get reference to z component of vector field.
 
template<class T >
const T & z_ (const T *p) const
 Get const reference to z component of vector field.
 
- Public Member Functions inherited from mirtk::VoxelFunction
void join (VoxelFunction &)
 Join results.
 
void split (VoxelFunction &)
 
 VoxelFunction ()
 Default constructor.
 

Protected Member Functions

 BaseTransform (const TransformData &data)
 Constructor.
 
 BaseTransform (const BaseTransform &other)
 Copy constructor.
 
- Protected Member Functions inherited from mirtk::MultipleVoxelTransformation::Base
 Base (int numvox=0)
 Default constructor.
 
 Base (const Base &other)
 Copy constructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from mirtk::VoxelFunction
static bool IsReduction ()
 
- Public Attributes inherited from mirtk::MultipleVoxelTransformation::TransformData
int _Begin
 Index of first image to process.
 
int _End
 Index of last image to process + 1.
 
const BaseImage_Input
 Single/reference input.
 
const BaseImage ** _Inputs
 Input images.
 
InterpolateImageFunction_Interpolator
 Single/reference interpolator.
 
InterpolateImageFunction ** _Interpolators
 Input interpolators.
 
bool _Invert
 Whether to invert the transformations.
 
BinaryImage_Mask
 Output foreground mask.
 
int _MaxNumberOfComponents
 Maximum number of image components/channels (_t)
 
int _NumberOfImages
 Number of input images.
 
double _Offset
 Output intensity offset.
 
Image_Output
 Single/reference output image.
 
Image ** _Outputs
 Output images.
 
double _PaddingValue
 Default padding value.
 
double * _PaddingValues
 Outside padding values.
 
double _ScaleFactor
 Output intensity scale factor.
 
const Transformation_Transformation1
 First transformation.
 
const Transformation_Transformation2
 Second transformation (optional)
 
- Public Attributes inherited from mirtk::VoxelFunction
const ImageAttributes_Domain
 
- Protected Attributes inherited from mirtk::MultipleVoxelTransformation::Base
int _NumberOfVoxels
 Number of voxels per vector component.
 
int _TwiceNumberOfVoxels
 Offset of z component.
 

Detailed Description

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
struct mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >

Base class for voxel transformation functions with various transformation methods

Using an explicit interpolate image function type helps the compiler to deduce which virtual methods are being called and thus inline the code for better performance. If the actual type of the interpolator is not known when instantiating this class, use the default InterpolateImageFunction base interpolate image function type.

Definition at line 156 of file MultipleVoxelTransformation.h.

Member Function Documentation

§ ApplyDisplacement()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::ApplyDisplacement ( const double *  disp1)
inline

Transform indices using single dense displacement field

Requires dense displacement field computed from _Transformation1 and ignores the second transformation, assuming it to be unused.

Definition at line 295 of file MultipleVoxelTransformation.h.

§ ApplyDisplacementAndTransformation()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::ApplyDisplacementAndTransformation ( const double *  disp1)
inline

Transform indices using fluid composition of dense displacement field and transformation

Requires dense displacement field computed from _Transformation1.

Definition at line 319 of file MultipleVoxelTransformation.h.

§ ApplyDisplacements()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::ApplyDisplacements ( const double *  disp1,
const double *  disp2 
)
inline

Transform indices using additive composition of dense displacement fields

Requires dense displacement fields computed from _Transformation1 and _Transformation2.

Definition at line 332 of file MultipleVoxelTransformation.h.

§ ApplyTransformation()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::ApplyTransformation ( )
inline

Transform indices using single transformation

Ignores the second transformation assuming it to be unused.

Definition at line 284 of file MultipleVoxelTransformation.h.

§ InterpolatePut() [1/2]

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::InterpolatePut ( int  i,
int  j,
int  k,
double *   
)
inline

Set outputs to interpolated input values

Most efficient implementation. Only applicable when all output images have double as scalar type and thus also no intensity rescaling is required.

Definition at line 424 of file MultipleVoxelTransformation.h.

§ InterpolatePut() [2/2]

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
template<class OutputVoxelType >
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::InterpolatePut ( int  i,
int  j,
int  k,
OutputVoxelType *   
)
inline

Set outputs to interpolated input values

Slightly less efficient implementation. Applicable when all output images have a known unique scalar type and no intensity rescaling is used.

Definition at line 446 of file MultipleVoxelTransformation.h.

§ InterpolatePutAsDouble()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::InterpolatePutAsDouble ( int  i,
int  j,
int  k 
)
inline

Set outputs to interpolated input values

Least efficient method without rescaling. Does not imply any particular output scalar type or interpolator type. In this case it is better to first store the voxel index transformation in the _Output2Input map and then update each output image separately.

Definition at line 473 of file MultipleVoxelTransformation.h.

§ InterpolateRescalePut()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
template<class OutputVoxelType >
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::InterpolateRescalePut ( int  i,
int  j,
int  k,
OutputVoxelType *   
)
inline

Set outputs to interpolated and rescaled input values

Efficient and applicable when all output images have a known unique scalar type.

Definition at line 496 of file MultipleVoxelTransformation.h.

§ InterpolateRescalePutAsDouble()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::InterpolateRescalePutAsDouble ( int  i,
int  j,
int  k 
)
inline

Set outputs to interpolated and rescaled input values

Least efficient but most general interpolation method. Does not imply any particular output scalar type or interpolator type. In this case it is better, however, to first store the voxel index transformation in the _Output2Input map and then update each output image separately if the additional required memory is not an issue.

Definition at line 524 of file MultipleVoxelTransformation.h.

§ PutOutsideValue()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
template<class OutputVoxelType >
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::PutOutsideValue ( int  i,
int  j,
int  k 
)
inline

Set outputs to dedicated outside value

Efficient and applicable when all output images have a known unique scalar type.

Definition at line 388 of file MultipleVoxelTransformation.h.

§ PutOutsideValueAsDouble()

template<class InterpolateImageFunction = InterpolateImageFunction, class InputDomain = InterpolationDomain::Foreground>
void mirtk::MultipleVoxelTransformation::BaseTransform< InterpolateImageFunction, InputDomain >::PutOutsideValueAsDouble ( int  i,
int  j,
int  k 
)
inline

Set outputs to dedicated outside value

Less efficient than PutOutsideValue but can also be used when output images have not a known unique scalar type.

Definition at line 407 of file MultipleVoxelTransformation.h.


The documentation for this struct was generated from the following file: