#include <Transformation.h>
|
bool | CheckDVFImageUpdateRequired (nifti_image *targetImageIn) |
|
bool | CheckImageGeometryEquality (nifti_image *img1, nifti_image *img2) |
|
virtual void | ClearDeformationVectorFieldImage () |
|
void | CubicSplineTransformImage3D (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | CubicSplineTransformImage2D (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | NearestNeighbourTransformImage3D (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | NearestNeighbourTransformImage2D (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | TrilinearTransformImage (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | BilinearTransformImage (nifti_image *sourceImage, nifti_image *warpedImage) |
|
void | CubicSplineTransformImageAdjoint3D (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | CubicSplineTransformImageAdjoint2D (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | NearestNeighbourTransformImageAdjoint3D (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | NearestNeighbourTransformImageAdjoint2D (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | TrilinearTransformImageAdjoint (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | BilinearTransformImageAdjoint (nifti_image *sourceImage, nifti_image *sourceWeightsImage, nifti_image *warpedImage, nifti_image *warpedWeightsImage) |
|
void | TrilinearImageGradient (nifti_image *sourceImage, nifti_image *resultGradientImage) |
|
void | BilinearImageGradient (nifti_image *sourceImage, nifti_image *resultGradientImage) |
|
void | CubicSplineImageGradient3D (nifti_image *sourceImage, nifti_image *resultGradientImage) |
|
void | CubicSplineImageGradient2D (nifti_image *sourceImage, nifti_image *resultGradientImage) |
|
Transformation class Abstract base class that must be reimplemented to obtain a functioning transformation class.
◆ PrecisionType
◆ ~Transformation()
virtual Transformation::~Transformation |
( |
| ) |
|
|
inlinevirtual |
◆ BilinearImageGradient()
void Transformation::BilinearImageGradient |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
resultGradientImage |
|
) |
| |
|
protected |
◆ BilinearTransformImage()
void Transformation::BilinearTransformImage |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ BilinearTransformImageAdjoint()
void Transformation::BilinearTransformImageAdjoint |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
- Todo:
- : Decide if original switch statement is necessary at all.
- Todo:
- Todo:
- : Remove reg_round macro with inline function
◆ CheckDVFImageUpdateRequired()
bool Transformation::CheckDVFImageUpdateRequired |
( |
nifti_image * |
targetImageIn | ) |
|
|
protected |
Function to check if the DVF needs to be updated according to the target image
- Parameters
-
targetImageIn | The geometry if the DVF is checked against the target image |
◆ CheckImageGeometryEquality()
bool Transformation::CheckImageGeometryEquality |
( |
nifti_image * |
img1, |
|
|
nifti_image * |
img2 |
|
) |
| |
|
protected |
Function that checks the basic geometry of two images. Is used by CheckDVFImageUpdateRequired() and checks the image size (nx, ny, and nz) as well as the qform/sform matrix depending on the qform/sform code. Note: Differences in higher dimensions (nu, nv, nt) are allowed to facilitd comparison between target image and DVF.
◆ ClearDeformationVectorFieldImage()
void Transformation::ClearDeformationVectorFieldImage |
( |
| ) |
|
|
protectedvirtual |
Helper function to delete the DVF image
◆ CubicSplineImageGradient2D()
void Transformation::CubicSplineImageGradient2D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
resultGradientImage |
|
) |
| |
|
protected |
◆ CubicSplineImageGradient3D()
void Transformation::CubicSplineImageGradient3D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
resultGradientImage |
|
) |
| |
|
protected |
◆ CubicSplineTransformImage2D()
void Transformation::CubicSplineTransformImage2D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ CubicSplineTransformImage3D()
void Transformation::CubicSplineTransformImage3D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ CubicSplineTransformImageAdjoint2D()
void Transformation::CubicSplineTransformImageAdjoint2D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
- Todo:
- : Decide if original switch statement is necessary at all.
◆ CubicSplineTransformImageAdjoint3D()
void Transformation::CubicSplineTransformImageAdjoint3D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
- Todo:
- : Decide if original switch statement is necessary at all.
◆ DeepCopy()
virtual std::shared_ptr< Transformation > Transformation::DeepCopy |
( |
| ) |
|
|
pure virtual |
◆ DisplayTransformationParameters()
virtual void Transformation::DisplayTransformationParameters |
( |
| ) |
|
|
pure virtual |
◆ GetConstraintGradientWRTTransformationParameters()
virtual PrecisionType * Transformation::GetConstraintGradientWRTTransformationParameters |
( |
| ) |
|
|
pure virtual |
Get the gradient of the regularisation/constraint with respect to the transformation parameters \( \frac{\partial \mathcal{R}_t}{\partial\mathbf{M}_t} \)
Implemented in BSplineTransformation, and SlidingTransformation.
◆ GetConstraintValue()
virtual double Transformation::GetConstraintValue |
( |
| ) |
|
|
pure virtual |
◆ GetCopyOfParameters()
◆ GetDeformationVectorField()
virtual nifti_image * Transformation::GetDeformationVectorField |
( |
nifti_image * |
targetImageIn | ) |
|
|
pure virtual |
Get the deformation vector field according to the current parameters. This function is expected to return a pointer to the member variable of the DVF.
- Parameters
-
targetImageIn | Nifti image is used to allocate the DVF. The DVF will remain part of the transformation class and will be deleted if the transformation is deleted. |
Implemented in BSplineTransformation, and SlidingTransformation.
◆ GetDVFGradientWRTTransformationParameters()
virtual PrecisionType * Transformation::GetDVFGradientWRTTransformationParameters |
( |
nifti_image * |
denseDVFIn | ) |
|
|
pure virtual |
Compute the gradient of the DVF with respect to the transformation parameters \( \frac{\partial \textbf{DVF}_t}{\partial \mathbf{M_t}} \).
- Parameters
-
denseDVFIn | pointer to the nifti image for which the best match of transformation parameters will be found |
- Returns
- pointer to the internally allocated output data of length numberOfParameters. Needs to be freed outside of this class since no internal references will be kept.
Implemented in BSplineTransformation, and SlidingTransformation.
◆ GetImageGradientWRTDVF()
void Transformation::GetImageGradientWRTDVF |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
outWarpedGradientImage |
|
) |
| |
|
virtual |
Calculate the gradient of an image with respect to the deformation vector field. This calculates \( \frac{\partial \mathbf{I}_{T_t}}{\partial \textbf{DVF}_t} \) and is not dependent on any parametrisation of a derived transformation.
- Parameters
-
sourceImage | Nifti-image structure with the image from which the derivative will be calculated. |
outWarpedGradientImage | Nifti image structure wich will be filled with the calculated gradient. Has to be allocated outside of this function. |
◆ GetMaxTransformationParameterLength()
Function to determine the maximum length of a given set of parameters. This length depends on how the transformation parameters correspond internally to each other, i.e. how the x, y, and z component are stored.
Implemented in BSplineTransformation, and SlidingTransformation.
◆ GetNumberOfParameters()
virtual unsigned int Transformation::GetNumberOfParameters |
( |
| ) |
|
|
inlinevirtual |
Get the number of parameters required to describe this transformation completely.
◆ GetPaddingValue()
◆ GetSumOfPenaltyWeights()
◆ GetTransformationAsImage()
virtual std::vector< nifti_image * > Transformation::GetTransformationAsImage |
( |
| ) |
|
|
pure virtual |
Function that returns the current transformation a vecotr of images. These are not the DVFs, but images of the parameters instead. Hence it can only be implemented by any derived classes.
Implemented in BSplineTransformation, and SlidingTransformation.
◆ InitialiseLevel()
virtual void Transformation::InitialiseLevel |
( |
unsigned int |
level | ) |
|
|
pure virtual |
◆ NearestNeighbourTransformImage2D()
void Transformation::NearestNeighbourTransformImage2D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ NearestNeighbourTransformImage3D()
void Transformation::NearestNeighbourTransformImage3D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ NearestNeighbourTransformImageAdjoint2D()
void Transformation::NearestNeighbourTransformImageAdjoint2D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
◆ NearestNeighbourTransformImageAdjoint3D()
void Transformation::NearestNeighbourTransformImageAdjoint3D |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
◆ ReorientateVectorImage()
void Transformation::ReorientateVectorImage |
( |
nifti_image * |
vectorFieldToReorientate, |
|
|
mat44 |
reorientationMatrix |
|
) |
| |
Function to reorientate vectors in 5D nifti image. Vectors which are stored along the 5th (u) dimension will be reoriented
- Parameters
-
vectorFieldToReorientate | Vector image to be reorientated |
reorientationMatrix | 4 x 4 Matrix used to reorientate vectors |
◆ SetParameters()
virtual void Transformation::SetParameters |
( |
PrecisionType * |
paramsIn, |
|
|
bool |
parametersAreDisplacements |
|
) |
| |
|
pure virtual |
◆ TransformImage()
void Transformation::TransformImage |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
Transform/warp an image; The warped image defines the geometry and will contain the resampled image contents.
- Parameters
-
sourceImage | The source image will be resampeled into the warped image space according to the transformation parameters |
warpedImage | The warped image defines the geometry of the internally calculated DVF and will also hold the actually warped image. |
◆ TransformImageAdjoint()
void Transformation::TransformImageAdjoint |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
Transform an image using the "push-interpolation". This function was originally implemented specifically for reg_resp, hence the functionality will be provided by protected function of this class.
- Parameters
-
sourceImage | Image that will be push-transformed into the warped image |
sourceWeightsImage | Weights associated with the source image. This considers the image acquisition process where the acquired image may not have contributed equally to the voxel in the source image. |
warpedImage | Image into which the intensities will be pushed. Note that intensities will be accumulated. |
warpedWeightsImage | Warped (and accumulated) weights of the source image. |
◆ TrilinearImageGradient()
void Transformation::TrilinearImageGradient |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
resultGradientImage |
|
) |
| |
|
protected |
◆ TrilinearTransformImage()
void Transformation::TrilinearTransformImage |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
warpedImage |
|
) |
| |
|
protected |
◆ TrilinearTransformImageAdjoint()
void Transformation::TrilinearTransformImageAdjoint |
( |
nifti_image * |
sourceImage, |
|
|
nifti_image * |
sourceWeightsImage, |
|
|
nifti_image * |
warpedImage, |
|
|
nifti_image * |
warpedWeightsImage |
|
) |
| |
|
protected |
- Todo:
- : Decide if original switch statement is necessary at all.
◆ deformationVectorFieldImage
nifti_image* Transformation::deformationVectorFieldImage |
|
protected |
The deformation vector field image.
◆ dvfImageUpdateRequired
bool Transformation::dvfImageUpdateRequired |
|
protected |
Indicates if the DVF requires re-calculation when it is required.
◆ interpolation
int Transformation::interpolation |
|
protected |
Type of interpolation used.
- Todo:
- Change into enumeration.
◆ numberOfParameters
unsigned int Transformation::numberOfParameters |
|
protected |
The total number of parameters needed to describe the transformation.
◆ warpedPaddingValue
Padding value for the warped image.
The documentation for this class was generated from the following files: