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));
79 return static_cast<OutputPixelType>((-1) * p * std::log(p) / std::log(2.0));
99template <
typename THistogram,
typename TImage = Image<
double, 3>>
103 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
SmartPointer< Self > Pointer
HistogramToEntropyImageFilter Self
HistogramToEntropyImageFilter()=default
HistogramToImageFilter< THistogram, TImage, Function::HistogramEntropyFunction< SizeValueType, typename TImage::PixelType > > Superclass
~HistogramToEntropyImageFilter() override=default
SmartPointer< const Self > ConstPointer
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType