18 #ifndef __itkHistogramToEntropyImageFilter_h
19 #define __itkHistogramToEntropyImageFilter_h
54 template<
typename TInput,
typename TOutput =
double >
76 return static_cast< OutputPixelType >( ( -1 ) * p * std::log(p) / std::log(2.0) );
82 return static_cast< OutputPixelType >( ( -1 ) * p * std::log(p) / std::log(2.0) );
101 template<
typename THistogram,
typename TImage=Image<
double, 3> >
104 Function::HistogramEntropyFunction< SizeValueType, typename TImage::PixelType > >
Light weight base class for most itk classes.
SmartPointer< Self > Pointer
void SetTotalFrequency(const SizeValueType n)
virtual ~HistogramToEntropyImageFilter()
unsigned long SizeValueType
~HistogramEntropyFunction()
HistogramToEntropyImageFilter()
SizeValueType GetTotalFrequency() const
HistogramToEntropyImageFilter Self
HistogramToImageFilter< THistogram, TImage, Function::HistogramEntropyFunction< SizeValueType, typename TImage::PixelType > > Superclass
This class takes a histogram as an input and returns an image of type specified by the functor...
SmartPointer< const Self > ConstPointer
The class takes a histogram as an input and gives the entropy image as the output. A pixel, at position I, in the output image is given by.
SizeValueType m_TotalFrequency
OutputPixelType operator()(const TInput &A) const
void operator=(const Self &)
HistogramEntropyFunction()