#include "mitkHistogramGenerator.h"#include "mitkImageTimeSelector.h"#include "mitkImageAccessByItk.h"#include "itkMITKScalarImageToHistogramGenerator.h"Go to the source code of this file.
Functions | |
| template<typename TPixel , unsigned int VImageDimension> | |
| void | InternalCompute (itk::Image< TPixel, VImageDimension > *itkImage, const mitk::HistogramGenerator *mitkHistoGenerator, mitk::HistogramGenerator::HistogramType::ConstPointer &histogram) |
| void InternalCompute | ( | itk::Image< TPixel, VImageDimension > * | itkImage, |
| const mitk::HistogramGenerator * | mitkHistoGenerator, | ||
| mitk::HistogramGenerator::HistogramType::ConstPointer & | histogram | ||
| ) |
Definition at line 48 of file mitkHistogramGenerator.cpp.
References mitk::HistogramGenerator::GetSize().
Referenced by mitk::HistogramGenerator::ComputeHistogram(), and mitk::VolumeCalculator::ComputeVolume().
{
#if !defined(ITK_USE_REVIEW_STATISTICS)
typedef itk::Statistics::MITKScalarImageToHistogramGenerator<
itk::Image< TPixel, VImageDimension >,
double > HistogramGeneratorType;
#else
typedef itk::Statistics::ScalarImageToHistogramGenerator< itk::Image< TPixel, VImageDimension > >
HistogramGeneratorType;
#endif
typename HistogramGeneratorType::Pointer histogramGenerator = HistogramGeneratorType::New();
histogramGenerator->SetInput( itkImage );
histogramGenerator->SetNumberOfBins( mitkHistoGenerator->GetSize() );
// histogramGenerator->SetMarginalScale( 10.0 );
histogramGenerator->Compute();
histogram = histogramGenerator->GetOutput();
}
1.7.2