19 #include <itkMattesMutualInformationImageToImageMetric.h>
45 template <
class TPixelType,
unsigned int VImageDimension>
47 itk::Image<TPixelType, VImageDimension> * )
49 typedef typename itk::Image<TPixelType, VImageDimension> FixedImageType;
50 typedef typename itk::Image<TPixelType, VImageDimension> MovingImageType;
53 bool useSampling =
m_Controls.m_UseSamplingMattesMutualInformation->isChecked();
57 MetricPointer->SetNumberOfSpatialSamples(
58 m_Controls.m_NumberOfSpatialSamplesMattesMutualInformation->text().toInt());
62 MetricPointer->UseAllPixelsOn();
64 MetricPointer->SetNumberOfHistogramBins(
m_Controls.m_NumberOfHistogramBinsMattesMutualInformation->text().toInt());
65 MetricPointer->ReinitializeSeed(76926294);
66 MetricPointer->SetComputeGradient(
m_Controls.m_ComputeGradient->isChecked());
68 return MetricPointer.GetPointer();
73 itk::Array<double> metricValues;
74 metricValues.SetSize(4);
76 metricValues[0] =
m_Controls.m_ComputeGradient->isChecked();
77 metricValues[1] =
m_Controls.m_UseSamplingMattesMutualInformation->isChecked();
78 metricValues[2] =
m_Controls.m_NumberOfSpatialSamplesMattesMutualInformation->text().toInt();
79 metricValues[3] =
m_Controls.m_NumberOfHistogramBinsMattesMutualInformation->text().toInt();
85 m_Controls.m_ComputeGradient->setChecked(metricValues[0]);
86 m_Controls.m_UseSamplingMattesMutualInformation->setChecked(metricValues[1]);
87 m_Controls.m_NumberOfSpatialSamplesMattesMutualInformation->setText(QString::number(metricValues[2]));
88 m_Controls.m_NumberOfHistogramBinsMattesMutualInformation->setText(QString::number(metricValues[3]));
93 return "MattesMutualInformation";
99 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
100 m_Controls.m_NumberOfSpatialSamplesMattesMutualInformation->setValidator(validatorLineEditInput);
101 m_Controls.m_NumberOfHistogramBinsMattesMutualInformation->setValidator(validatorLineEditInput);
itk::SmartPointer< Self > Pointer
mitk::Image::Pointer m_MovingImage
#define AccessByItk(mitkImage, itkImageTypeFunction)
Access a MITK image by an ITK image.
MetricType
Unique integer value for every metric.
Widget for rigid registration.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.