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