18#ifndef itkHistogramToEntropyImageFilter_h
19#define itkHistogramToEntropyImageFilter_h
55template <
typename TInput,
typename TOutput =
double>
75 return static_cast<OutputPixelType>((-1) * p * std::log(p) / std::log(2.0));
80 return static_cast<OutputPixelType>((-1) * p * std::log(p) / std::log(2.0));
101template <
typename THistogram,
typename TImage = Image<
double, 3>>
105 Function::HistogramEntropyFunction<SizeValueType, typename TImage::PixelType>>
HistogramEntropyFunction()=default
SizeValueType GetTotalFrequency() const
OutputPixelType operator()(const TInput &A) const
void SetTotalFrequency(const SizeValueType n)
~HistogramEntropyFunction()=default
SizeValueType m_TotalFrequency
The class takes a histogram as an input and gives the entropy image as the output....
HistogramToEntropyImageFilter()=default
~HistogramToEntropyImageFilter() override=default
This class takes a histogram as an input and returns an image of type specified by the functor.
Light weight base class for most itk classes.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType