Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
itkMITKScalarImageToHistogramGenerator.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef __itkMITKScalarImageToHistogramGenerator_h
14 #define __itkMITKScalarImageToHistogramGenerator_h
15 
16 #include <itkImageToListSampleAdaptor.h>
17 #include <itkObject.h>
18 #include <itkSampleToHistogramFilter.h>
19 
20 namespace itk
21 {
22  namespace Statistics
23  {
24  template <class TImageType, class TMeasurementType = typename TImageType::PixelType>
26  {
27  public:
30  typedef Object Superclass;
33 
35  itkTypeMacro(MITKScalarImageToHistogramGenerator, Object);
36 
38  itkFactorylessNewMacro(Self);
39  itkCloneMacro(Self);
40 
41  typedef TImageType ImageType;
42  typedef itk::Statistics::ImageToListSampleAdaptor<ImageType> AdaptorType;
43  typedef typename AdaptorType::Pointer AdaptorPointer;
44  typedef typename ImageType::PixelType PixelType;
45 
46  typedef itk::Statistics::Histogram<TMeasurementType, itk::Statistics::DenseFrequencyContainer2> HistogramType;
47  typedef itk::Statistics::SampleToHistogramFilter<AdaptorType, HistogramType> GeneratorType;
48 
49  typedef typename GeneratorType::Pointer GeneratorPointer;
50 
51  typedef typename HistogramType::Pointer HistogramPointer;
52  typedef typename HistogramType::ConstPointer HistogramConstPointer;
53 
54  public:
56  void Compute(void);
57 
59  void SetInput(const ImageType *);
60 
64  const HistogramType *GetOutput() const;
65 
67  void SetNumberOfBins(unsigned int numberOfBins);
68 
70  void SetMarginalScale(double marginalScale);
71 
72  protected:
75  void PrintSelf(std::ostream &os, Indent indent) const override;
76 
77  private:
78  AdaptorPointer m_ImageToListAdaptor;
79 
80  GeneratorPointer m_HistogramGenerator;
81  };
82 
83  } // end of namespace Statistics
84 } // end of namespace itk
85 
86 #ifndef ITK_MANUAL_INSTANTIATION
87 #include "itkMITKScalarImageToHistogramGenerator.txx"
88 #endif
89 
90 #endif
itk::Statistics::MITKScalarImageToHistogramGenerator::Superclass
Object Superclass
Definition: itkMITKScalarImageToHistogramGenerator.h:30
itk::Statistics::MITKScalarImageToHistogramGenerator::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const override
itk::Statistics::MITKScalarImageToHistogramGenerator
Definition: itkMITKScalarImageToHistogramGenerator.h:25
itk::Statistics::MITKScalarImageToHistogramGenerator::Self
MITKScalarImageToHistogramGenerator Self
Definition: itkMITKScalarImageToHistogramGenerator.h:29
itk::Statistics::MITKScalarImageToHistogramGenerator::SetNumberOfBins
void SetNumberOfBins(unsigned int numberOfBins)
itk::Statistics::MITKScalarImageToHistogramGenerator::GetOutput
const HistogramType * GetOutput() const
itk::Statistics::MITKScalarImageToHistogramGenerator::ImageType
TImageType ImageType
Definition: itkMITKScalarImageToHistogramGenerator.h:39
itk::SmartPointer< Self >
itk::Statistics::MITKScalarImageToHistogramGenerator::AdaptorPointer
AdaptorType::Pointer AdaptorPointer
Definition: itkMITKScalarImageToHistogramGenerator.h:43
itk::Statistics::MITKScalarImageToHistogramGenerator::AdaptorType
itk::Statistics::ImageToListSampleAdaptor< ImageType > AdaptorType
Definition: itkMITKScalarImageToHistogramGenerator.h:42
itk::Statistics::MITKScalarImageToHistogramGenerator::HistogramType
itk::Statistics::Histogram< TMeasurementType, itk::Statistics::DenseFrequencyContainer2 > HistogramType
Definition: itkMITKScalarImageToHistogramGenerator.h:46
itk::Statistics::MITKScalarImageToHistogramGenerator::GeneratorPointer
GeneratorType::Pointer GeneratorPointer
Definition: itkMITKScalarImageToHistogramGenerator.h:49
itk::Statistics::MITKScalarImageToHistogramGenerator::HistogramConstPointer
HistogramType::ConstPointer HistogramConstPointer
Definition: itkMITKScalarImageToHistogramGenerator.h:52
itk::Statistics::MITKScalarImageToHistogramGenerator::Pointer
SmartPointer< Self > Pointer
Definition: itkMITKScalarImageToHistogramGenerator.h:31
itk
SET FUNCTIONS.
Definition: itkIntelligentBinaryClosingFilter.h:30
itk::Statistics::MITKScalarImageToHistogramGenerator::SetMarginalScale
void SetMarginalScale(double marginalScale)
itk::Statistics::MITKScalarImageToHistogramGenerator::MITKScalarImageToHistogramGenerator
MITKScalarImageToHistogramGenerator()
itk::Statistics::MITKScalarImageToHistogramGenerator::ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkMITKScalarImageToHistogramGenerator.h:32
itk::Statistics::MITKScalarImageToHistogramGenerator::GeneratorType
itk::Statistics::SampleToHistogramFilter< AdaptorType, HistogramType > GeneratorType
Definition: itkMITKScalarImageToHistogramGenerator.h:47
itk::Statistics::MITKScalarImageToHistogramGenerator::PixelType
ImageType::PixelType PixelType
Definition: itkMITKScalarImageToHistogramGenerator.h:44
itk::Statistics::MITKScalarImageToHistogramGenerator::HistogramPointer
HistogramType::Pointer HistogramPointer
Definition: itkMITKScalarImageToHistogramGenerator.h:51
itk::Statistics::MITKScalarImageToHistogramGenerator::Compute
void Compute(void)
itk::Statistics::MITKScalarImageToHistogramGenerator::~MITKScalarImageToHistogramGenerator
~MITKScalarImageToHistogramGenerator() override
Definition: itkMITKScalarImageToHistogramGenerator.h:74
itk::Statistics::MITKScalarImageToHistogramGenerator::SetInput
void SetInput(const ImageType *)