36 std::cout <<
"RigidRegistrationParameters.xml is empty or does not exist. There are no presets to select."
42 m_BlurMovingImage =
true;
43 m_BlurFixedImage =
true;
65 itk::Array<double> transformValues)
69 itk::Array<double> initialParameters;
70 if (transformParameters->GetInitialParameters().size())
72 initialParameters = transformParameters->GetInitialParameters();
75 transformParameters->SetTransform(transformValues[0]);
77 if (transformParameters->GetInitialParameters().size())
79 transformParameters->SetInitialParameters(initialParameters);
84 itk::Array<double> scales;
90 for (
unsigned int i = 0; i < scales.size(); i++)
92 scales[i] = transformValues[i + 2];
94 transformParameters->SetScales(scales);
95 transformParameters->SetTransformInitializerOn(
false);
98 if (transformValues[1] == 1)
100 transformParameters->SetUseOptimizerScales(
true);
103 return transformParameters;
110 metricParameters->SetMetric(metricValues[0]);
111 metricParameters->SetComputeGradient(metricValues[1]);
116 metricParameters->SetNumberOfHistogramBinsMutualInformationHistogram(metricValues[2]);
121 metricParameters->SetSpatialSamplesMattesMutualInformation(metricValues[3]);
122 metricParameters->SetNumberOfHistogramBinsMattesMutualInformation(metricValues[4]);
125 return metricParameters;
129 itk::Array<double> optimizerValues)
133 optimizerParameters->SetOptimizer(optimizerValues[0]);
134 optimizerParameters->SetMaximize(
139 optimizerParameters->SetLearningRateGradientDescent(optimizerValues[2]);
140 optimizerParameters->SetNumberOfIterationsGradientDescent(optimizerValues[3]);
145 cout <<
"use regularstepgradientdescent" << endl;
146 optimizerParameters->SetGradientMagnitudeToleranceRegularStepGradientDescent(optimizerValues[2]);
147 optimizerParameters->SetMinimumStepLengthRegularStepGradientDescent(optimizerValues[3]);
148 optimizerParameters->SetMaximumStepLengthRegularStepGradientDescent(optimizerValues[4]);
149 optimizerParameters->SetRelaxationFactorRegularStepGradientDescent(optimizerValues[5]);
150 optimizerParameters->SetNumberOfIterationsRegularStepGradientDescent(optimizerValues[6]);
153 return optimizerParameters;
void SetObserver(RigidRegistrationObserver::Pointer observer)
Class to load and save parameter presets for rigid registration.
itk::SmartPointer< Self > Pointer
bool LoadPreset()
Tries to find mitkRigidRegistrationPresets.xml in /mitk/Config and loads all presets stored in this f...
RigidRegistrationObserver::Pointer m_Observer
DataCollection - Class to facilitate loading/accessing structured data.
PyramidalRegistrationMethod()
virtual void SetFixedMask(Image::Pointer fixedMask)
Image::Pointer m_FixedMask
virtual ~PyramidalRegistrationMethod()
friend struct PyramidalRegistrationMethodAccessFunctor
Image::Pointer m_MovingMask
virtual void GenerateData() override
A version of GenerateData() specific for image processing filters.
Image::Pointer m_ReferenceImage
virtual void SetMovingMask(Image::Pointer movingMask)
InputImageType * GetInput(void)
virtual void SetReferenceImage(Image::Pointer fixedImage)
void SetInterpolator(int interpolator)