19 #include <itkNormalizedMutualInformationHistogramImageToImageMetric.h>
24 QWidget *parent, Qt::WindowFlags f)
48 template <
class TPixelType,
unsigned int VImageDimension>
50 itk::Image<TPixelType, VImageDimension> * )
52 typedef typename itk::Image<TPixelType, VImageDimension> FixedImageType;
53 typedef typename itk::Image<TPixelType, VImageDimension> MovingImageType;
56 unsigned int nBins =
m_Controls.m_NumberOfHistogramBinsNormalizedMutualInformationHistogram->text().toInt();
57 typename itk::NormalizedMutualInformationHistogramImageToImageMetric<FixedImageType,
58 MovingImageType>::HistogramType::SizeType
60 histogramSize[0] = nBins;
61 histogramSize[1] = nBins;
62 MetricPointer->SetHistogramSize(histogramSize);
63 MetricPointer->SetComputeGradient(
m_Controls.m_ComputeGradient->isChecked());
65 return MetricPointer.GetPointer();
70 itk::Array<double> metricValues;
71 metricValues.SetSize(2);
73 metricValues[0] =
m_Controls.m_ComputeGradient->isChecked();
74 metricValues[1] =
m_Controls.m_NumberOfHistogramBinsNormalizedMutualInformationHistogram->text().toInt();
80 m_Controls.m_ComputeGradient->setChecked(metricValues[0]);
81 m_Controls.m_NumberOfHistogramBinsNormalizedMutualInformationHistogram->setText(QString::number(metricValues[1]));
86 return "NormalizedMutualInformationHistogram";
92 QValidator *validatorLineEditInput =
new QIntValidator(0, 20000000,
this);
93 m_Controls.m_NumberOfHistogramBinsNormalizedMutualInformationHistogram->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.