Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::HistogramGenerator Class Reference

Provides an easy way to calculate an itk::Histogram for a mitk::Image. More...

#include <mitkHistogramGenerator.h>

Inheritance diagram for mitk::HistogramGenerator:
Collaboration diagram for mitk::HistogramGenerator:

Public Types

typedef itk::Statistics::Histogram< double > HistogramType
 

Public Member Functions

 mitkClassMacroItkParent (HistogramGenerator, itk::Object)
 
Pointer Clone () const
 
virtual void SetImage (mitk::Image::ConstPointer _arg)
 Set the input image for histogram computation. More...
 
virtual void SetSize (int _arg)
 Set the number of histogram bins. More...
 
virtual int GetSize () const
 Get the number of histogram bins. More...
 
virtual const HistogramType * GetHistogram ()
 Get the computed histogram. More...
 
void ComputeHistogram ()
 Compute the histogram from the input image. More...
 
float GetMaximumFrequency () const
 Get the maximum frequency in the computed histogram. More...
 

Static Public Member Functions

static Pointer New ()
 
static float CalculateMaximumFrequency (const HistogramType *histogram)
 Calculate the maximum frequency in a given histogram. More...
 

Protected Member Functions

 HistogramGenerator ()
 
 ~HistogramGenerator () override
 

Protected Attributes

mitk::Image::ConstPointer m_Image
 
int m_Size
 
HistogramType::ConstPointer m_Histogram
 

Detailed Description

Provides an easy way to calculate an itk::Histogram for a mitk::Image.

See also
mitk::Image

Definition at line 28 of file mitkHistogramGenerator.h.

Member Typedef Documentation

◆ HistogramType

typedef itk::Statistics::Histogram<double> mitk::HistogramGenerator::HistogramType

Definition at line 35 of file mitkHistogramGenerator.h.

Constructor & Destructor Documentation

◆ HistogramGenerator()

mitk::HistogramGenerator::HistogramGenerator ( )
protected

◆ ~HistogramGenerator()

mitk::HistogramGenerator::~HistogramGenerator ( )
overrideprotected

Member Function Documentation

◆ CalculateMaximumFrequency()

static float mitk::HistogramGenerator::CalculateMaximumFrequency ( const HistogramType *  histogram)
static

Calculate the maximum frequency in a given histogram.

Parameters
histogramThe histogram to analyze.
Returns
The maximum frequency value.

◆ Clone()

Pointer mitk::HistogramGenerator::Clone ( ) const

◆ ComputeHistogram()

void mitk::HistogramGenerator::ComputeHistogram ( )

Compute the histogram from the input image.

The histogram is recomputed only if the image has been modified since the last computation.

◆ GetHistogram()

virtual const HistogramType* mitk::HistogramGenerator::GetHistogram ( )
virtual

Get the computed histogram.

◆ GetMaximumFrequency()

float mitk::HistogramGenerator::GetMaximumFrequency ( ) const

Get the maximum frequency in the computed histogram.

Returns
The maximum frequency value.

◆ GetSize()

virtual int mitk::HistogramGenerator::GetSize ( ) const
virtual

Get the number of histogram bins.

◆ mitkClassMacroItkParent()

mitk::HistogramGenerator::mitkClassMacroItkParent ( HistogramGenerator  ,
itk::Object   
)

◆ New()

static Pointer mitk::HistogramGenerator::New ( )
static

◆ SetImage()

virtual void mitk::HistogramGenerator::SetImage ( mitk::Image::ConstPointer  _arg)
virtual

Set the input image for histogram computation.

◆ SetSize()

virtual void mitk::HistogramGenerator::SetSize ( int  _arg)
virtual

Set the number of histogram bins.

Member Data Documentation

◆ m_Histogram

HistogramType::ConstPointer mitk::HistogramGenerator::m_Histogram
protected

Definition at line 79 of file mitkHistogramGenerator.h.

◆ m_Image

mitk::Image::ConstPointer mitk::HistogramGenerator::m_Image
protected

Definition at line 77 of file mitkHistogramGenerator.h.

◆ m_Size

int mitk::HistogramGenerator::m_Size
protected

Definition at line 78 of file mitkHistogramGenerator.h.


The documentation for this class was generated from the following file: