13 #ifndef itkMITKScalarImageToHistogramGenerator_h
14 #define itkMITKScalarImageToHistogramGenerator_h
16 #include <itkImageToListSampleAdaptor.h>
17 #include <itkObject.h>
18 #include <itkSampleToHistogramFilter.h>
34 template <
class TImageType,
class TMeasurementType =
typename TImageType::PixelType>
48 itkFactorylessNewMacro(
Self);
52 typedef itk::Statistics::ImageToListSampleAdaptor<ImageType>
AdaptorType;
56 typedef itk::Statistics::Histogram<TMeasurementType, itk::Statistics::DenseFrequencyContainer2>
HistogramType;
57 typedef itk::Statistics::SampleToHistogramFilter<AdaptorType, HistogramType>
GeneratorType;
98 void PrintSelf(std::ostream &os, Indent indent)
const override;
109 #ifndef ITK_MANUAL_INSTANTIATION
110 #include <itkMITKScalarImageToHistogramGenerator.tpp>
Generates a histogram from a scalar image.
GeneratorType::Pointer GeneratorPointer
void PrintSelf(std::ostream &os, Indent indent) const override
Print the state of this object to an output stream.
MITKScalarImageToHistogramGenerator Self
Standard typedefs.
itk::Statistics::SampleToHistogramFilter< AdaptorType, HistogramType > GeneratorType
~MITKScalarImageToHistogramGenerator() override
Destructor.
itk::Statistics::ImageToListSampleAdaptor< ImageType > AdaptorType
ImageType::PixelType PixelType
MITKScalarImageToHistogramGenerator()
Default constructor. Creates the adaptor and histogram generator.
void Compute(void)
Trigger the computation of the histogram.
void SetNumberOfBins(unsigned int numberOfBins)
Set number of histogram bins.
HistogramType::ConstPointer HistogramConstPointer
itk::Statistics::Histogram< TMeasurementType, itk::Statistics::DenseFrequencyContainer2 > HistogramType
AdaptorType::Pointer AdaptorPointer
SmartPointer< const Self > ConstPointer
const HistogramType * GetOutput() const
Return the computed histogram.
SmartPointer< Self > Pointer
void SetMarginalScale(double marginalScale)
Set the marginal scale value to be passed to the histogram generator.
HistogramType::Pointer HistogramPointer
void SetInput(const ImageType *image)
Connect the input image for which the histogram is going to be computed.