18#ifndef itkMovingHistogramMorphologicalGradientImageFilter_h
19#define itkMovingHistogramMorphologicalGradientImageFilter_h
28template <
typename TInputPixel>
44 using MapType = std::map<TInputPixel, SizeValueType>;
68 typename MapType::iterator mapIt =
m_Map.begin();
69 while (mapIt !=
m_Map.end())
71 if (mapIt->second == 0)
77 TInputPixel toErase = mapIt->first;
90 return m_Map.rbegin()->first -
m_Map.begin()->first;
105template <
typename TInputPixel>
182 return TInputPixel{};
208class MorphologicalGradientHistogram<signed char> :
public VectorMorphologicalGradientHistogram<signed char>
212class ITK_TEMPLATE_EXPORT MorphologicalGradientHistogram<bool> :
public VectorMorphologicalGradientHistogram<bool>
234template <
typename TInputImage,
typename TOutputImage,
typename TKernel>
240 typename Function::MorphologicalGradientHistogram<typename TInputImage::PixelType>>
typename TInputImage::RegionType RegionType
typename TInputImage::SizeType SizeType
typename TInputImage::IndexType IndexType
typename TOutputImage::PixelType OutputPixelType
typename TInputImage::OffsetType OffsetType
void AddPixel(const TInputPixel &p)
std::map< TInputPixel, SizeValueType > MapType
MorphologicalGradientHistogram()=default
~MorphologicalGradientHistogram()=default
TInputPixel GetValue(const TInputPixel &)
static bool UseVectorBasedAlgorithm()
void RemovePixel(const TInputPixel &p)
void AddPixel(const TInputPixel &p)
std::vector< SizeValueType > m_Vector
static bool UseVectorBasedAlgorithm()
~VectorMorphologicalGradientHistogram()=default
VectorMorphologicalGradientHistogram()
void RemovePixel(const TInputPixel &p)
TInputPixel GetValue(const TInputPixel &)
Base class for all process objects that output image data.
typename OutputImageType::RegionType OutputImageRegionType
TOutputImage OutputImageType
TInputImage InputImageType
typename TInputImage::PixelType PixelType
Implements a generic moving histogram algorithm.
Morphological gradients enhance the variation of pixel intensity in a given neighborhood.
static constexpr unsigned int ImageDimension
MovingHistogramMorphologicalGradientImageFilter()=default
static bool GetUseVectorBasedAlgorithm()
~MovingHistogramMorphologicalGradientImageFilter() override=default
Define additional traits for native types such as int or float.
static constexpr T NonpositiveMin()
static constexpr T max(const T &)
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
ImageBaseType::SizeType SizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType