Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
Observer to react on rigid registration optimizer events. More...
#include <mitkRigidRegistrationObserver.h>
Public Types | |
typedef RigidRegistrationObserver | Self |
typedef itk::Command | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SingleValuedNonLinearOptimizer | OptimizerType |
typedef OptimizerType * | OptimizerPointer |
Public Member Functions | |
Pointer | Clone () const |
void | Execute (itk::Object *caller, const itk::EventObject &event) override |
Reacts on events from ITK optimizers. More... | |
void | Execute (const itk::Object *object, const itk::EventObject &event) override |
Not implemented... More... | |
void | AddStepsToDo (int steps) |
Add new steps to the progress bar. More... | |
void | SetRemainingProgress (int steps) |
Sets the remaining progress to the progress bar when the optimization process is done. More... | |
double | GetCurrentOptimizerValue () |
Returns the current optimizer value. This value is calculated by the used metric and shows, how good the images are aligned. More... | |
itk::Array< double > | GetCurrentTranslation () |
Returns the current transformation parameters for the moving image to this iteration step. More... | |
void | SetStopOptimization (bool stopOptimization) |
Sets the stop optimization flag, which is used to call the StopOptimization() method of the optimizer. More... | |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
RigidRegistrationObserver () | |
void | HandleOptimizationIterationEvent (OptimizerType *optimizer) |
Observer to react on rigid registration optimizer events.
This class reacts on events sent by ITK optimizers. These events will be sent for every iteration the optimizer performs. This class also takes care for the progress bar for every iteration step.
The current optimizer values will be stored and a modified event will be sent to listeners registered to this observer. These listeners have the possibility to get the current optimizer parameters.
The optimization process can be stopped by setting stopOptimization to true. The optimization will be stopped after the next iteration step of the optimizer. Unfortunately this is not implemented for ExhaustiveOptimizer, LBFGSBOptimizer, AmoebaOptimizer, ConjugateGradientOptimizer and LBFGSOptimizer in ITK.
Definition at line 65 of file mitkRigidRegistrationObserver.h.
Definition at line 74 of file mitkRigidRegistrationObserver.h.
typedef itk::SingleValuedNonLinearOptimizer mitk::RigidRegistrationObserver::OptimizerType |
Definition at line 73 of file mitkRigidRegistrationObserver.h.
Definition at line 70 of file mitkRigidRegistrationObserver.h.
Definition at line 68 of file mitkRigidRegistrationObserver.h.
typedef itk::Command mitk::RigidRegistrationObserver::Superclass |
Definition at line 69 of file mitkRigidRegistrationObserver.h.
|
protected |
Definition at line 20 of file mitkRigidRegistrationObserver.cpp.
void mitk::RigidRegistrationObserver::AddStepsToDo | ( | int | steps | ) |
Add new steps to the progress bar.
Definition at line 137 of file mitkRigidRegistrationObserver.cpp.
References mitk::ProgressBar::AddStepsToDo(), and mitk::ProgressBar::GetInstance().
Pointer mitk::RigidRegistrationObserver::Clone | ( | ) | const |
|
override |
Reacts on events from ITK optimizers.
Stores the optimizer values, adds progress to the progress bar and sends a stop flag to stop the optimization process if it is set in this class. Also emits a signal to inform listeners about new optimizer values.
Definition at line 98 of file mitkRigidRegistrationObserver.cpp.
References mitk::ProgressBar::AddStepsToDo(), mitk::ProgressBar::GetInstance(), MITK_INFO, and mitk::ProgressBar::Progress().
|
override |
Not implemented...
Definition at line 133 of file mitkRigidRegistrationObserver.cpp.
double mitk::RigidRegistrationObserver::GetCurrentOptimizerValue | ( | ) |
Returns the current optimizer value. This value is calculated by the used metric and shows, how good the images are aligned.
Definition at line 147 of file mitkRigidRegistrationObserver.cpp.
itk::Array< double > mitk::RigidRegistrationObserver::GetCurrentTranslation | ( | ) |
Returns the current transformation parameters for the moving image to this iteration step.
These can include parameters for translation, scaling, rotation and shearing.
Definition at line 152 of file mitkRigidRegistrationObserver.cpp.
|
protected |
Definition at line 24 of file mitkRigidRegistrationObserver.cpp.
References MITK_INFO.
|
static |
Referenced by mitk::BSplineRegistration::BSplineRegistration().
void mitk::RigidRegistrationObserver::SetRemainingProgress | ( | int | steps | ) |
Sets the remaining progress to the progress bar when the optimization process is done.
Definition at line 142 of file mitkRigidRegistrationObserver.cpp.
References mitk::ProgressBar::GetInstance(), and mitk::ProgressBar::Progress().
void mitk::RigidRegistrationObserver::SetStopOptimization | ( | bool | stopOptimization | ) |
Sets the stop optimization flag, which is used to call the StopOptimization() method of the optimizer.
Unfortunately it is not implemented for ExhaustiveOptimizer, LBFGSBOptimizer, AmoebaOptimizer, ConjugateGradientOptimizer and LBFGSOptimizer in ITK.
Definition at line 160 of file mitkRigidRegistrationObserver.cpp.