19 #include <itkMutualInformationImageToImageMetric.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 MetricPointer->SetNumberOfSpatialSamples(
m_Controls.m_NumberOfSpatialSamplesMutualInformation->text().toInt());
54 MetricPointer->SetFixedImageStandardDeviation(
55 m_Controls.m_FixedImageStandardDeviationMutualInformation->text().toFloat());
56 MetricPointer->SetMovingImageStandardDeviation(
57 m_Controls.m_MovingImageStandardDeviationMutualInformation->text().toFloat());
58 MetricPointer->SetComputeGradient(
m_Controls.m_ComputeGradient->isChecked());
60 return MetricPointer.GetPointer();
65 itk::Array<double> metricValues;
66 metricValues.SetSize(4);
68 metricValues[0] =
m_Controls.m_ComputeGradient->isChecked();
69 metricValues[1] =
m_Controls.m_NumberOfSpatialSamplesMutualInformation->text().toInt();
70 metricValues[2] =
m_Controls.m_FixedImageStandardDeviationMutualInformation->text().toFloat();
71 metricValues[3] =
m_Controls.m_MovingImageStandardDeviationMutualInformation->text().toFloat();
77 m_Controls.m_ComputeGradient->setChecked(metricValues[0]);
78 m_Controls.m_NumberOfSpatialSamplesMutualInformation->setText(QString::number(metricValues[1]));
79 m_Controls.m_FixedImageStandardDeviationMutualInformation->setText(QString::number(metricValues[2]));
80 m_Controls.m_MovingImageStandardDeviationMutualInformation->setText(QString::number(metricValues[3]));
85 return "MutualInformation";
91 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
92 m_Controls.m_NumberOfSpatialSamplesMutualInformation->setValidator(validatorLineEditInput);
93 QValidator *validatorLineEditInputFloat =
new QDoubleValidator(0, 20000000, 8,
this);
94 m_Controls.m_FixedImageStandardDeviationMutualInformation->setValidator(validatorLineEditInputFloat);
95 m_Controls.m_MovingImageStandardDeviationMutualInformation->setValidator(validatorLineEditInputFloat);
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.