13 #ifndef mitkMultiModalRigidDefaultRegistrationAlgorithm_h
14 #define mitkMultiModalRigidDefaultRegistrationAlgorithm_h
16 #include "mapDiscreteElements.h"
17 #include "mapITKEuler3DMattesMIMultiResRegistrationAlgorithmTemplate.h"
18 #include "mapConfigure.h"
28 template<
class TImageType>
30 public ::map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm<TImageType, TImageType, ::map::algorithm::mitkMultiModalRigidDefaultRegistrationAlgorithmUIDPolicy, SealedFixedInterpolatorPolicyMacro< ::itk::LinearInterpolateImageFunction<TImageType, ::map::core::continuous::ScalarType> >, ::map::algorithm::itk::NoComponentInitializationPolicy>
35 typedef ::map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm<TImageType, TImageType, ::map::algorithm::mitkMultiModalRigidDefaultRegistrationAlgorithmUIDPolicy, SealedFixedInterpolatorPolicyMacro< ::itk::LinearInterpolateImageFunction<TImageType, ::map::core::continuous::ScalarType> >, ::map::algorithm::itk::NoComponentInitializationPolicy>
38 typedef ::itk::SmartPointer<Self>
Pointer;
42 ITKEuler3DMattesMIMultiResRegistrationAlgorithm);
56 Superclass::configureAlgorithm();
58 this->setResolutionLevels(3);
59 this->_preInitialize =
true;
60 this->_useCenterOfGravity =
false;
63 typename Superclass::ConcreteOptimizerType::ScalesType scales(6);
67 scales[3] = 1.0 / 1000;
68 scales[4] = 1.0 / 1000;
69 scales[5] = 1.0 / 1000;
71 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
72 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00);
73 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5);
74 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200);
75 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8);
76 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4);
79 this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30);
80 this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(
true);
81 this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed();
82 this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn();
88 Superclass::doInterLevelSetup();
90 if (this->getCurrentLevel() == 0)
92 typename Superclass::OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6);
96 scales[3] = 1.0 / 10000;
97 scales[4] = 1.0 / 10000;
98 scales[5] = 1.0 / 10000;
99 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
103 this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(
false);
105 typename Superclass::OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6);
109 scales[3] = 1.0 / 1000;
110 scales[4] = 1.0 / 1000;
111 scales[5] = 1.0 / 1000;
113 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
115 unsigned int nrOfSmpl = ::itk::Math::Round<unsigned int, double>
116 (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.15);
118 this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl);
125 void operator=(
const Self&);