17 #if (_MSC_VER == 1200)
18 #include <itkFixedCenterOfRotationAffineTransform.h>
30 #if !defined(ITK_USE_REVIEW_STATISTICS)
33 #include "itkScalarImageToHistogramGenerator.h"
44 template <
typename TPixel,
unsigned int VImageDimension>
49 #if !defined(ITK_USE_REVIEW_STATISTICS)
51 HistogramGeneratorType;
53 typedef itk::Statistics::ScalarImageToHistogramGenerator<itk::Image<TPixel, VImageDimension>> HistogramGeneratorType;
58 histogramGenerator->SetInput(itkImage);
60 histogramGenerator->SetNumberOfBins(mitkHistoGenerator->
GetSize());
62 histogramGenerator->Compute();
64 histogram = histogramGenerator->GetOutput();
69 if ((m_Histogram.IsNull()) || (m_Histogram->GetMTime() < m_Image->GetMTime()))
71 const_cast<mitk::Image *
>(m_Image.GetPointer())->SetRequestedRegionToLargestPossibleRegion();
78 timeSelector->SetInput(m_Image);
79 timeSelector->SetTimeNr(0);
80 timeSelector->UpdateLargestPossibleRegion();
111 return CalculateMaximumFrequency(this->m_Histogram);
116 HistogramType::ConstIterator itr = histogram->Begin();
117 HistogramType::ConstIterator end = histogram->End();
122 maxFreq = vnl_math_max(maxFreq,
125 static_cast<float>(itr.GetFrequency()));
virtual int GetSize() const
itk::SmartPointer< Self > Pointer
float GetMaximumFrequency() const
static float CalculateMaximumFrequency(const HistogramType *histogram)
static void Update(vtkPolyData *)
#define AccessByItk_n(mitkImage, itkImageTypeFunction, va_tuple)
Access a MITK image by an ITK image with one or more parameters.
itk::SmartPointer< const Self > ConstPointer
void InternalCompute(itk::Image< TPixel, VImageDimension > *itkImage, const mitk::HistogramGenerator *mitkHistoGenerator, mitk::HistogramGenerator::HistogramType::ConstPointer &histogram)
Image class for storing images.
virtual ~HistogramGenerator()
itk::Statistics::Histogram< double > HistogramType
Provides an easy way to calculate an itk::Histogram for a mitk::Image.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.