Generic multiresolution voxel-registration class. More...
#include <cmtkVoxelRegistration.h>
Classes | |
class | ConstructorFailed |
Exception class. More... | |
class | ImagePreprocessor |
Local class for preprocessing image data, e.g., by histogram operations, thresholding, and cropping. More... | |
Public Member Functions | |
VoxelRegistration () | |
Default constructor. | |
virtual | ~VoxelRegistration () |
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 (int, Metric) | |
Metric to use. | |
cmtkGetSetMacro (int, Algorithm) | |
Optimization algorithm to use. | |
cmtkGetSetMacro (double, Exploration) | |
Exploration, i.e. initial step size. | |
cmtkGetSetMacro (double, Accuracy) | |
Accuracy, i.e. final step size. | |
cmtkGetSetMacro (bool, UseOriginalData) | |
Flag whether the last resolution level uses the original images. | |
cmtkGetSetMacro (Types::Coordinate, Sampling) | |
Sampling, i.e. last non-original resolution. | |
cmtkGetSetMacroString (Protocol) | |
Name of protocol file. | |
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. | |
cmtkGetSetMacro (RegistrationCallback::SmartPtr, Callback) | |
Pointer to callback object. | |
cmtkGetSetMacro (AffineXform::SmartPtr, InitialTransformation) | |
Initial transformation. | |
cmtkGetSetMacro (bool, InitialXformIsInverse) | |
FLag whether initial transformation is an inverse. | |
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 | |
double | CoarsestResolution |
Coarsest resolution to resample image data to. | |
double | OptimizerStepFactor |
Factor between optimization step sizes. | |
bool | UseMaxNorm |
Use maximum norm instead of Euclid where applicable. | |
Optimizer::ReturnType | m_DeltaFThreshold |
Threshold for terminating optimization based on changes of the target function. | |
ImagePreprocessor | m_PreprocessorRef |
Image preprocessor for reference image. | |
ImagePreprocessor | m_PreprocessorFlt |
Image preprocessor for floating image. | |
bool | SwitchVolumes |
Flag whether model and reference are exchanged. | |
Xform::SmartPtr | m_Xform |
Current / final transformation. | |
std::stack< Functional::SmartPtr > | FunctionalStack |
Stack of functional objects for the resolution steps. | |
Optimizer::SmartPtr | m_Optimizer |
Pointer to optimizer object. | |
Private Attributes | |
double | TimeStartRegistration |
Time of registration start. | |
double | TimeStartLevel |
Time of entering the current resolution level. | |
double | WalltimeStartRegistration |
Reference walltime of registration start. | |
double | WalltimeStartLevel |
Reference walltime of entering the current resolution level. | |
double | ThreadTimeStartRegistration |
Time of registration start. | |
double | ThreadTimeStartLevel |
Time of entering the current resolution level. |
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 cmtkVoxelRegistration.h.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | int | , |
Metric | |||
) | [protected] |
Metric to use.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | int | , |
Algorithm | |||
) | [protected] |
Optimization algorithm to use.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | double | , |
Accuracy | |||
) | [protected] |
Accuracy, i.e. final step size.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | UniformVolume::SmartPtr | , |
Volume_1 | |||
) | [protected] |
First data volume.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | UniformVolume::SmartPtr | , |
Volume_2 | |||
) | [protected] |
Second data volume.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | bool | , |
UseOriginalData | |||
) | [protected] |
Flag whether the last resolution level uses the original images.
cmtk::VoxelRegistration::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::VoxelRegistration::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.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | double | , |
Exploration | |||
) | [protected] |
Exploration, i.e. initial step size.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | Types::Coordinate | , |
Sampling | |||
) | [protected] |
Sampling, i.e. last non-original resolution.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | RegistrationCallback::SmartPtr | , |
Callback | |||
) | [protected] |
Pointer to callback object.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | AffineXform::SmartPtr | , |
InitialTransformation | |||
) | [protected] |
Initial transformation.
cmtk::VoxelRegistration::cmtkGetSetMacro | ( | bool | , |
InitialXformIsInverse | |||
) | [protected] |
FLag whether initial transformation is an inverse.
cmtk::VoxelRegistration::cmtkGetSetMacroString | ( | Protocol | ) | [protected] |
Name of protocol file.
double cmtk::VoxelRegistration::GetLevelElapsedTime | ( | ) | const [inline] |
Return elapsed process time during current level.
Definition at line 308 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetTimeProcess().
double cmtk::VoxelRegistration::GetLevelElapsedWalltime | ( | ) | const [inline] |
Return elapsed walltime during current level.
Definition at line 322 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetWalltime().
double cmtk::VoxelRegistration::GetThreadLevelElapsedTime | ( | ) | const [inline] |
Return elapsed thread time during current level.
Definition at line 336 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetTimeThread().
double cmtk::VoxelRegistration::GetThreadTotalElapsedTime | ( | ) | const [inline] |
Return total elapsed thread time.
Definition at line 329 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetTimeThread().
Referenced by cmtk::AffineRegistrationCommandLine::OutputResultList().
double cmtk::VoxelRegistration::GetTotalElapsedTime | ( | ) | const [inline] |
Return total elapsed process time.
Definition at line 301 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetTimeProcess().
Referenced by cmtk::AffineRegistrationCommandLine::OutputResultList().
double cmtk::VoxelRegistration::GetTotalElapsedWalltime | ( | ) | const [inline] |
Return total elapsed walltime.
Definition at line 315 of file cmtkVoxelRegistration.h.
References cmtk::Timers::GetWalltime().
Referenced by cmtk::AffineRegistrationCommandLine::OutputResultList().
double cmtk::VoxelRegistration::CoarsestResolution [protected] |
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 90 of file cmtkVoxelRegistration.h.
Referenced by cmtk::ElasticRegistration::InitRegistration(), cmtk::AffineRegistration::InitRegistration(), cmtk::AffineRegistrationCommandLine::OutputResultList(), and VoxelRegistration().
std::stack<Functional::SmartPtr> cmtk::VoxelRegistration::FunctionalStack [protected] |
Stack of functional objects for the resolution steps.
Definition at line 225 of file cmtkVoxelRegistration.h.
Referenced by cmtk::ElasticRegistration::InitRegistration(), cmtk::AffineRegistration::InitRegistration(), and Register().
Threshold for terminating optimization based on changes of the target function.
Definition at line 102 of file cmtkVoxelRegistration.h.
Referenced by Register().
Pointer to optimizer object.
Definition at line 228 of file cmtkVoxelRegistration.h.
Referenced by cmtk::ElasticRegistration::InitRegistration(), cmtk::AffineRegistration::InitRegistration(), and Register().
Image preprocessor for floating image.
Definition at line 207 of file cmtkVoxelRegistration.h.
Referenced by cmtk::AffineRegistrationCommandLine::OutputResultList().
Image preprocessor for reference image.
Definition at line 204 of file cmtkVoxelRegistration.h.
Referenced by cmtk::AffineRegistrationCommandLine::OutputResultList().
Xform::SmartPtr cmtk::VoxelRegistration::m_Xform [protected] |
Current / final transformation.
Definition at line 222 of file cmtkVoxelRegistration.h.
Referenced by DoneRegistration(), cmtk::AffineRegistration::GetTransformation(), cmtk::ElasticRegistration::InitRegistration(), cmtk::AffineRegistration::InitRegistration(), and Register().
double cmtk::VoxelRegistration::OptimizerStepFactor [protected] |
Factor between optimization step sizes.
Definition at line 96 of file cmtkVoxelRegistration.h.
Referenced by cmtk::ElasticRegistration::InitRegistration(), cmtk::AffineRegistration::InitRegistration(), cmtk::AffineRegistrationCommandLine::OutputResultList(), and VoxelRegistration().
bool cmtk::VoxelRegistration::SwitchVolumes [protected] |
Flag whether model and reference are exchanged.
Definition at line 210 of file cmtkVoxelRegistration.h.
Referenced by cmtk::AffineRegistration::GetReformattedFloatingImage(), cmtk::AffineRegistration::GetTransformation(), and cmtk::AffineRegistration::InitRegistration().
double cmtk::VoxelRegistration::ThreadTimeStartLevel [private] |
Time of entering the current resolution level.
This is used as the reference for per-level computation time calculation.
Definition at line 370 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().
double cmtk::VoxelRegistration::ThreadTimeStartRegistration [private] |
Time of registration start.
This is used as the reference for absolute computation time calculation.
Definition at line 365 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().
double cmtk::VoxelRegistration::TimeStartLevel [private] |
Time of entering the current resolution level.
This is used as the reference for per-level computation time calculation.
Definition at line 350 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().
double cmtk::VoxelRegistration::TimeStartRegistration [private] |
Time of registration start.
This is used as the reference for absolute computation time calculation.
Definition at line 345 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().
bool cmtk::VoxelRegistration::UseMaxNorm [protected] |
Use maximum norm instead of Euclid where applicable.
Definition at line 99 of file cmtkVoxelRegistration.h.
Referenced by cmtk::ElasticRegistration::InitRegistration(), and VoxelRegistration().
double cmtk::VoxelRegistration::WalltimeStartLevel [private] |
Reference walltime of entering the current resolution level.
This is used as the reference for per-level computation time calculation.
Definition at line 360 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().
double cmtk::VoxelRegistration::WalltimeStartRegistration [private] |
Reference walltime of registration start.
This is used as the reference for absolute computation time calculation.
Definition at line 355 of file cmtkVoxelRegistration.h.
Referenced by InitRegistration().