17 #include "mapDeploymentDLLHelper.h"
18 #include "mapDiscreteElements.h"
19 #include "mapITKEuler3DMattesMIMultiResRegistrationAlgorithmTemplate.h"
20 #include "mapConfigure.h"
26 typedef map::core::discrete::Elements<3>::InternalImageType
ImageType;
32 class MultiModalRigidDefaultRegistrationAlgorithm :
33 public map::algorithm::boxed::ITKEuler3DMattesMIMultiResRegistrationAlgorithm<ImageType, ImageType, ::map::algorithm::MITK_MultiModal_rigid_defaultUIDPolicy, SealedFixedInterpolatorPolicyMacro< ::itk::LinearInterpolateImageFunction<ImageType, map::core::continuous::ScalarType> >, map::algorithm::itk::NoComponentInitializationPolicy>
36 typedef MultiModalRigidDefaultRegistrationAlgorithm Self;
38 typedef ITKEuler3DMattesMIMultiResRegistrationAlgorithm<ImageType, ImageType, ::map::algorithm::MITK_MultiModal_rigid_defaultUIDPolicy, SealedFixedInterpolatorPolicyMacro< ::itk::LinearInterpolateImageFunction<ImageType, map::core::continuous::ScalarType> >, map::algorithm::itk::NoComponentInitializationPolicy>
41 typedef ::itk::SmartPointer<Self>
Pointer;
44 itkTypeMacro(MultiModalRigidDefaultRegistrationAlgorithm,
45 ITKEuler3DMattesMIMultiResRegistrationAlgorithm);
46 mapNewAlgorithmMacro(Self);
49 MultiModalRigidDefaultRegistrationAlgorithm()
53 virtual ~MultiModalRigidDefaultRegistrationAlgorithm()
57 void configureAlgorithm()
59 Superclass::configureAlgorithm();
61 this->setResolutionLevels(3);
62 this->_preInitialize =
true;
63 this->_useCenterOfGravity =
false;
66 ConcreteOptimizerType::ScalesType scales(6);
70 scales[3] = 1.0 / 1000;
71 scales[4] = 1.0 / 1000;
72 scales[5] = 1.0 / 1000;
74 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
75 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMaximumStepLength(3.00);
76 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetMinimumStepLength(0.5);
77 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetNumberOfIterations(200);
78 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetRelaxationFactor(0.8);
79 this->getConcreteOptimizerControl()->getConcreteOptimizer()->SetGradientMagnitudeTolerance(1e-4);
82 this->getConcreteMetricControl()->getConcreteMetric()->SetNumberOfHistogramBins(30);
83 this->getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(
true);
84 this->getConcreteMetricControl()->getConcreteMetric()->ReinitializeSeed();
85 this->getConcreteMetricControl()->getConcreteMetric()->UseExplicitPDFDerivativesOn();
91 Superclass::doInterLevelSetup();
93 if (this->getCurrentLevel() == 0)
95 OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6);
99 scales[3] = 1.0 / 10000;
100 scales[4] = 1.0 / 10000;
101 scales[5] = 1.0 / 10000;
102 getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
106 getConcreteMetricControl()->getConcreteMetric()->SetUseAllPixels(
false);
108 OptimizerBaseType::SVNLOptimizerBaseType::ScalesType scales(6);
112 scales[3] = 1.0 / 1000;
113 scales[4] = 1.0 / 1000;
114 scales[5] = 1.0 / 1000;
116 getConcreteOptimizerControl()->getConcreteOptimizer()->SetScales(scales);
118 unsigned int nrOfSmpl = ::itk::Math::Round<unsigned int, double>
119 (this->getMovingImage()->GetLargestPossibleRegion().GetNumberOfPixels() * 0.15);
121 getConcreteMetricControl()->getConcreteMetric()->SetNumberOfSpatialSamples(nrOfSmpl);
127 MultiModalRigidDefaultRegistrationAlgorithm(
const Self& source);
128 void operator=(
const Self&);
itk::SmartPointer< Self > Pointer
DataCollection - Class to facilitate loading/accessing structured data.
itkEventMacroDeclaration(FocusChangedEvent, itk::AnyEvent) class MITKCORE_EXPORT TestingRenderingManager typedef RenderingManager Superclass
itk::SmartPointer< const Self > ConstPointer
map::core::discrete::Elements< 3 >::InternalImageType ImageType
mapDeployAlgorithmMacro(mitk::MultiModalRigidDefaultRegistrationAlgorithm)