Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes

cmtk::ImagePairRegistration Class Reference
[cmtkRegistration Library]

Generic multiresolution voxel-registration class. More...

#include <cmtkImagePairRegistration.h>

Inheritance diagram for cmtk::ImagePairRegistration:
Inheritance graph
[legend]
Collaboration diagram for cmtk::ImagePairRegistration:
Collaboration graph
[legend]

List of all members.

Classes

class  ConstructorFailed
 Exception class. More...
class  ImagePreprocessor
 Local class for preprocessing image data, e.g., by histogram operations, thresholding, and cropping. More...
class  LevelParameters
 Base class for registration level parameters. More...

Public Types

typedef ImagePairRegistration Self
 This class.
typedef SmartPointer< SelfSmartPtr
 Smart pointer.

Public Member Functions

 ImagePairRegistration ()
 Default constructor.
virtual ~ImagePairRegistration ()
 Destructor.
virtual CallbackResult Register ()
 Do registration.
double GetTotalElapsedTime () const
 Return total elapsed process time.
double GetLevelElapsedTime () const
 Return elapsed process time during current level.
double GetTotalElapsedWalltime () const
 Return total elapsed walltime.
double GetLevelElapsedWalltime () const
 Return elapsed walltime during current level.
double GetThreadTotalElapsedTime () const
 Return total elapsed thread time.
double GetThreadLevelElapsedTime () const
 Return elapsed thread time during current level.

Protected Member Functions

 cmtkGetSetMacro (Interpolators::InterpolationEnum, FloatingImageInterpolation)
 Override default interpolation method.
 cmtkGetSetMacro (int, Algorithm)
 Optimization algorithm to use.
 cmtkGetSetMacro (UniformVolume::SmartPtr, Volume_1)
 First data volume.
 cmtkGetSetMacro (UniformVolume::SmartPtr, Volume_2)
 Second data volume.
 cmtkGetSetMacro (UniformVolume::SmartPtr, ReferenceVolume)
 Reference data volume.
 cmtkGetSetMacro (UniformVolume::SmartPtr, FloatingVolume)
 Floating data volume.
virtual void SetForceOutside (const bool flag=true, const Types::DataItem value=0)
 Set flag and value for forcing values outside the floating image.
 cmtkGetSetMacro (RegistrationCallback::SmartPtr, Callback)
 Pointer to callback object.
 cmtkGetSetMacro (AffineXform::SmartPtr, InitialTransformation)
 Initial transformation.
 cmtkGetSetMacro (bool, InitialXformIsInverse)
 FLag whether initial transformation is an inverse.
virtual FunctionalMakeFunctional (const int level, const Self::LevelParameters *levelParameters)=0
 Make functional for a set of registration level parameters.
Member functions to be overwritten.
virtual CallbackResult InitRegistration ()
 Initialize registration.
virtual void OutputResult (const CoordinateVector *v)
 Output registration result.
virtual void DoneRegistration (const CoordinateVector *v=NULL)
 Finalize registration.
virtual void EnterResolution (CoordinateVector::SmartPtr &v, Functional::SmartPtr &f, const int idx, const int total)
 Enter resolution level.
virtual int DoneResolution (CoordinateVector::SmartPtr &, Functional::SmartPtr &, const int, const int)
 Finish resolution level.

Protected Attributes

int m_Metric
 Image pair similarity measure to use as the registration metric.
unsigned int m_AutoMultiLevels
 Number of levels for automatic parameter generation.
double m_MaxStepSize
 Maximum optimization step size (this determines search space exploration).
double m_MinStepSize
 Minimum optimization step size (this determines search precision).
double m_CoarsestResolution
 Coarsest resolution to resample image data to.
bool m_UseOriginalData
 Flag whether the last resolution level uses the original images.
double m_OptimizerStepFactor
 Factor between optimization step sizes.
bool m_UseMaxNorm
 Use maximum norm instead of Euclid where applicable.
Optimizer::ReturnType m_DeltaFThreshold
 Threshold for terminating optimization based on changes of the target function.
Types::Coordinate m_Sampling
 Image sampling.
bool m_ForceOutsideFlag
 Flag for forcing pixel values outside the floating image.
Types::DataItem m_ForceOutsideValue
 Value for forcing pixel values outside the floating image.
ImagePreprocessor m_PreprocessorRef
 Image preprocessor for reference image.
ImagePreprocessor m_PreprocessorFlt
 Image preprocessor for floating image.
Xform::SmartPtr m_Xform
 Current / final transformation.
std::stack
< Self::LevelParameters::SmartPtr
m_ParameterStack
 Stack of functional objects for the resolution steps.
Optimizer::SmartPtr m_Optimizer
 Pointer to optimizer object.

Private Attributes

double m_TimeStartRegistration
 Time of registration start.
double m_TimeStartLevel
 Time of entering the current resolution level.
double m_WalltimeStartRegistration
 Reference walltime of registration start.
double m_WalltimeStartLevel
 Reference walltime of entering the current resolution level.
double m_ThreadTimeStartRegistration
 Time of registration start.
double m_ThreadTimeStartLevel
 Time of entering the current resolution level.

Detailed Description

Generic multiresolution voxel-registration class.

By implementing member functions to retrieve parameters and report results in derived classes, registration can be integrated into various environments.

Definition at line 70 of file cmtkImagePairRegistration.h.


Member Typedef Documentation


Constructor & Destructor Documentation

virtual cmtk::ImagePairRegistration::~ImagePairRegistration (  ) [inline, virtual]

Destructor.

Definition at line 336 of file cmtkImagePairRegistration.h.


Member Function Documentation

cmtk::ImagePairRegistration::cmtkGetSetMacro ( Interpolators::InterpolationEnum  ,
FloatingImageInterpolation   
) [protected]

Override default interpolation method.

For intensity images, the default interpolator is LINEAR, for label images it is NEARESTNEIGHBOR. These are used if this field is left at its initial value, DEFAULT.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( int  ,
Algorithm   
) [protected]

Optimization algorithm to use.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( UniformVolume::SmartPtr  ,
Volume_2   
) [protected]

Second data volume.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( RegistrationCallback::SmartPtr  ,
Callback   
) [protected]

Pointer to callback object.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( AffineXform::SmartPtr  ,
InitialTransformation   
) [protected]

Initial transformation.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( UniformVolume::SmartPtr  ,
ReferenceVolume   
) [protected]

Reference data volume.

This is a pointer to the actual reference volume, which is either Volume_1 or Volume_2 above, depending on whether registration was instructed to switch the two or not.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( bool  ,
InitialXformIsInverse   
) [protected]

FLag whether initial transformation is an inverse.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( UniformVolume::SmartPtr  ,
Volume_1   
) [protected]

First data volume.

cmtk::ImagePairRegistration::cmtkGetSetMacro ( UniformVolume::SmartPtr  ,
FloatingVolume   
) [protected]

Floating data volume.

This is a pointer to the actual floating volume, which is either Volume_2 or Volume_1 above, depending on whether registration was instructed to switch the two or not.

double cmtk::ImagePairRegistration::GetLevelElapsedTime (  ) const [inline]

Return elapsed process time during current level.

Definition at line 355 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetTimeProcess().

double cmtk::ImagePairRegistration::GetLevelElapsedWalltime (  ) const [inline]

Return elapsed walltime during current level.

Definition at line 369 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetWalltime().

double cmtk::ImagePairRegistration::GetThreadLevelElapsedTime (  ) const [inline]

Return elapsed thread time during current level.

Definition at line 383 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetTimeThread().

double cmtk::ImagePairRegistration::GetThreadTotalElapsedTime (  ) const [inline]

Return total elapsed thread time.

Definition at line 376 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetTimeThread().

Referenced by cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

double cmtk::ImagePairRegistration::GetTotalElapsedTime (  ) const [inline]

Return total elapsed process time.

Definition at line 348 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetTimeProcess().

Referenced by cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

double cmtk::ImagePairRegistration::GetTotalElapsedWalltime (  ) const [inline]

Return total elapsed walltime.

Definition at line 362 of file cmtkImagePairRegistration.h.

References cmtk::Timers::GetWalltime().

Referenced by cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

virtual Functional* cmtk::ImagePairRegistration::MakeFunctional ( const int  level,
const Self::LevelParameters levelParameters 
) [protected, pure virtual]

Make functional for a set of registration level parameters.

Implemented in cmtk::ImagePairAffineRegistration, and cmtk::ImagePairNonrigidRegistration.

Referenced by Register().

virtual void cmtk::ImagePairRegistration::SetForceOutside ( const bool  flag = true,
const Types::DataItem  value = 0 
) [inline, protected, virtual]

Set flag and value for forcing values outside the floating image.

Definition at line 152 of file cmtkImagePairRegistration.h.


Member Data Documentation

Number of levels for automatic parameter generation.

Definition at line 94 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Coarsest resolution to resample image data to.

If this value is unset, ie. less than or equal to zero, then the coarsest resolution is automatically computed from the initial step size (Exploration).

Definition at line 107 of file cmtkImagePairRegistration.h.

Referenced by ImagePairRegistration(), cmtk::ImagePairNonrigidRegistration::InitRegistration(), cmtk::ImagePairAffineRegistration::InitRegistration(), and cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

Threshold for terminating optimization based on changes of the target function.

Definition at line 119 of file cmtkImagePairRegistration.h.

Referenced by Register().

Flag for forcing pixel values outside the floating image.

Definition at line 128 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairNonrigidRegistration::GetReformattedFloatingImage().

Value for forcing pixel values outside the floating image.

Definition at line 131 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairNonrigidRegistration::GetReformattedFloatingImage().

Image pair similarity measure to use as the registration metric.

Definition at line 81 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairNonrigidRegistration::ImagePairNonrigidRegistration(), and cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

Minimum optimization step size (this determines search precision).

Definition at line 100 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration(), cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList(), and Register().

Stack of functional objects for the resolution steps.

Definition at line 269 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairNonrigidRegistration::InitRegistration(), cmtk::ImagePairAffineRegistration::InitRegistration(), and Register().

Image preprocessor for floating image.

Definition at line 240 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

Image preprocessor for reference image.

Definition at line 237 of file cmtkImagePairRegistration.h.

Referenced by cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

Image sampling.

This is the finest resampled image resolution in the multi-resolution image pyramid. The only finer resolution images are the original ones.

Definition at line 125 of file cmtkImagePairRegistration.h.

Referenced by ImagePairRegistration(), InitRegistration(), cmtk::ImagePairNonrigidRegistration::InitRegistration(), cmtk::ImagePairAffineRegistration::InitRegistration(), and cmtk::ImagePairAffineRegistrationCommandLine::OutputResultList().

Time of entering the current resolution level.

This is used as the reference for per-level computation time calculation.

Definition at line 417 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Time of registration start.

This is used as the reference for absolute computation time calculation.

Definition at line 412 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Time of entering the current resolution level.

This is used as the reference for per-level computation time calculation.

Definition at line 397 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Time of registration start.

This is used as the reference for absolute computation time calculation.

Definition at line 392 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Use maximum norm instead of Euclid where applicable.

Definition at line 116 of file cmtkImagePairRegistration.h.

Referenced by ImagePairRegistration(), and cmtk::ImagePairNonrigidRegistration::InitRegistration().

Flag whether the last resolution level uses the original images.

Definition at line 110 of file cmtkImagePairRegistration.h.

Referenced by ImagePairRegistration(), cmtk::ImagePairNonrigidRegistration::InitRegistration(), and cmtk::ImagePairAffineRegistration::InitRegistration().

Reference walltime of entering the current resolution level.

This is used as the reference for per-level computation time calculation.

Definition at line 407 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().

Reference walltime of registration start.

This is used as the reference for absolute computation time calculation.

Definition at line 402 of file cmtkImagePairRegistration.h.

Referenced by InitRegistration().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines