#include <irtkMotionTracking.h>
This class implements a motion registration filter which takes an image sequence and calculates the transformation which maps each time frame into the coordinate system of the first time frame.
Definition at line 26 of file irtkMotionTracking.h.
Public Member Functions | |
irtkMotionTracking () | |
Constructor. | |
virtual | ~irtkMotionTracking () |
Destructor. | |
virtual void | SetInput (irtkGreyImage *, irtkGreyImage *) |
Sets input for the registration filter. | |
virtual void | SetOutput (irtkTransformation *)=0 |
Sets output for the registration filter. | |
virtual void | Run () |
Runs the registration filter. | |
virtual double | Evaluate ()=0 |
Evaluates the similarity metric. | |
virtual double | EvaluateDerivative (int, double) |
Evaluates the registration. | |
virtual double | EvaluateGradient (float, float *) |
Evaluates the gradient of the similarity metric. | |
virtual const char * | NameOfClass ()=0 |
Returns the name of the class. | |
virtual void | Debug (string) |
Prints debugging messages if debugging is enabled. | |
virtual void | Print ()=0 |
Prints information about the progress of the registration. | |
virtual void | GuessParameter ()=0 |
Guess parameters. | |
virtual void | Read (char *) |
Read registration parameters from file. | |
virtual Bool | Read (char *, char *, int &) |
Parse parameter line. | |
virtual void | Write (char *) |
Write registration parameters to file. | |
virtual void | Write (ostream &) |
Write parameters to stream. | |
virtual | SetMacro (DebugFlag, int) |
virtual | GetMacro (DebugFlag, int) |
virtual | SetMacro (OptimizationMethod, irtkOptimizationMethod) |
virtual | GetMacro (OptimizationMethod, irtkOptimizationMethod) |
Protected Member Functions | |
virtual void | Initialize () |
Initial set up for the registration. | |
virtual void | Finalize () |
Final set up for the registration. | |
virtual void | Initialize (int) |
Initial set up for the registration at a multiresolution level. | |
virtual void | Finalize (int) |
Final set up for the registration at a multiresolution level. | |
virtual void | UpdateLUT () |
Update lookup table. | |
Protected Attributes | |
irtkGreyImage * | _image |
Image sequence. | |
irtkGreyImage * | _mask |
Mask for valid image region over which to track. | |
irtkTransformation * | _transformation |
Transformation. | |
irtkBSplineFreeFormTransformation4D * | _affd |
Transformation in B-Spline format. | |
irtkSimilarityMetric * | _metric |
Histogram. | |
irtkInterpolateImageFunction * | _interpolator |
Interpolator. | |
irtkOptimizer * | _optimizer |
Optimizer. | |
double | _Blurring [MAX_NO_RESOLUTIONS] |
Blurring of image (in mm). | |
double | _Resolution [MAX_NO_RESOLUTIONS][3] |
Resolution of image (in mm). | |
int | _NumberOfSteps [MAX_NO_RESOLUTIONS] |
Number of step sizes. | |
double | _LengthOfSteps [MAX_NO_RESOLUTIONS] |
Length of steps. | |
int | _NumberOfIterations [MAX_NO_RESOLUTIONS] |
Max. number of iterations per step size. | |
short | _TargetPadding |
Padding value of target image. | |
int | _NumberOfLevels |
Number of levels of multiresolution pyramid. | |
int | _NumberOfBins |
Max. number of bins for histogram. | |
irtkSimilarityMeasure | _SimilarityMeasure |
Similarity measure for registration. | |
irtkOptimizationMethod | _OptimizationMethod |
Optimization method for registration. | |
irtkInterpolationMode | _InterpolationMode |
Interpolation mode to use during resampling and registration. | |
double | _DX |
Control point spacing in the x-direction. | |
double | _DY |
Control point spacing in the y-direction. | |
double | _DZ |
Control point spacing in the z-direction. | |
double | _Epsilon |
Convergence parameter for optimization based on change in similarity. | |
double | _Delta [MAX_NO_RESOLUTIONS] |
Convergence parameter for optimization based on change in the transformation. | |
double | _SpeedupFactor |
Speedup factor when calculating derivative. | |
int | _DebugFlag |
Debugging flag. | |
double | _x1 |
Source image domain which can be interpolated fast. | |
double | _y1 |
double | _z1 |
double | _x2 |
double | _y2 |
double | _z2 |
irtkSimilarityMetric * | _tmpMetricA |
Used as temporary memory for metric. | |
irtkSimilarityMetric * | _tmpMetricB |
float * | _mffdLookupTable |
Used as lookup table for transformed coordinates up to level n-1. | |
float * | _affdLookupTable |
Used as lookup table for transformed coordinates including level n. | |
float * | _localLookupTable |
Used as lookup table for the contribution of each control point. | |
Friends | |
istream & | operator>> (istream &, irtkMotionTracking *) |
Interface to input file stream. | |
ostream & | operator<< (ostream &, const irtkMotionTracking *) |
Interface to output file stream. |
virtual double irtkMotionTracking::Evaluate | ( | ) | [pure virtual] |
Evaluates the similarity metric.
This function evaluates the similarity metric of the registration by looping over the target image and interpolating the transformed source image while filling the joint histogram. This function returns the value of the similarity measure using Similarity().
virtual double irtkMotionTracking::EvaluateDerivative | ( | int | , | |
double | ||||
) | [virtual] |
Evaluates the registration.
This function evaluates the registration by looping over the target image and interpolating the transformed source image while filling the joint histogram. This function returns the value of the similarity measure using Similarity(). This function uses the cached result of any previous call to Evaluate() and recalculates the similarity measure in the specified region of interest.
virtual double irtkMotionTracking::EvaluateGradient | ( | float | , | |
float * | ||||
) | [virtual] |
Evaluates the gradient of the similarity metric.
This function evaluates the gradient of the similarity metric of the registration by looping over the target image and interpolating the transformed source image while filling the joint histogram. The partial derivatives are approximated using a finite difference scheme. The step size for the finite difference scheme is passed as a parameter to the function. The function returns the norm of the gradient vector as well as the gradient vector containing the partial derivatives.
float* irtkMotionTracking::_mffdLookupTable [protected] |
Used as lookup table for transformed coordinates up to level n-1.
This lookup table needs to be calculated only once for each image resolution level.
Definition at line 121 of file irtkMotionTracking.h.
float* irtkMotionTracking::_affdLookupTable [protected] |
Used as lookup table for transformed coordinates including level n.
This lookup table needs to be calculated each time a control point has been modified.
Definition at line 126 of file irtkMotionTracking.h.
float* irtkMotionTracking::_localLookupTable [protected] |
Used as lookup table for the contribution of each control point.
This lookup table needs to be calculated only once.
Definition at line 130 of file irtkMotionTracking.h.