18 #ifndef itkMovingHistogramMorphologicalGradientImageFilter_h
19 #define itkMovingHistogramMorphologicalGradientImageFilter_h
28 template<
typename TInputPixel >
40 using MapType = std::map< TInputPixel, SizeValueType >;
52 inline TInputPixel
GetValue(
const TInputPixel &)
60 typename MapType::iterator mapIt =
m_Map.begin();
61 while ( mapIt !=
m_Map.end() )
63 if ( mapIt->second == 0 )
69 TInputPixel toErase = mapIt->first;
82 return m_Map.rbegin()->first -
m_Map.begin()->first;
96 template<
typename TInputPixel >
192 class MorphologicalGradientHistogram<signed char>:
193 public VectorMorphologicalGradientHistogram<signed char>
198 class MorphologicalGradientHistogram<bool>:
199 public VectorMorphologicalGradientHistogram<bool>
222 template<
typename TInputImage,
typename TOutputImage,
typename TKernel >
225 typename Function::MorphologicalGradientHistogram< typename TInputImage::
VectorMorphologicalGradientHistogram()
MovingHistogramMorphologicalGradientImageFilter()=default
typename TInputImage::PixelType PixelType
~VectorMorphologicalGradientHistogram()=default
Define numeric traits for std::vector.
unsigned long SizeValueType
typename TInputImage::IndexType IndexType
Implements a generic moving histogram algorithm.
~MorphologicalGradientHistogram()=default
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::RegionType RegionType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Morphological gradients enhance the variation of pixel intensity in a given neighborhood.
TInputImage InputImageType
TInputPixel GetValue(const TInputPixel &)
static bool GetUseVectorBasedAlgorithm()
typename TInputImage::OffsetType OffsetType
~MovingHistogramMorphologicalGradientImageFilter() override=default
std::map< TInputPixel, SizeValueType > MapType
ImageBaseType::SizeType SizeType
typename OutputImageType::RegionType OutputImageRegionType
static bool UseVectorBasedAlgorithm()
ImageBaseType::IndexType IndexType
typename TInputImage::SizeType SizeType
void AddPixel(const TInputPixel &p)
TOutputImage OutputImageType
MorphologicalGradientHistogram()=default
void RemovePixel(const TInputPixel &p)
std::vector< SizeValueType > m_Vector
static constexpr unsigned int ImageDimension
Base class for filters that take an image as input and produce an image as output.
ImageBaseType::RegionType RegionType
static bool UseVectorBasedAlgorithm()
TInputPixel GetValue(const TInputPixel &)
typename Superclass::OutputImageRegionType OutputImageRegionType
void RemovePixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)