18#ifndef itkAttributeKeepNObjectsLabelMapFilter_h
19#define itkAttributeKeepNObjectsLabelMapFilter_h
42template <
typename TImage,
43 typename TAttributeAccessor =
44 typename Functor::AttributeLabelObjectAccessor<typename TImage::LabelObjectType>>
68 static constexpr unsigned int ImageDimension = TImage::ImageDimension;
76#ifdef ITK_USE_CONCEPT_CHECKING
92 itkSetMacro(ReverseOrdering,
bool);
93 itkGetConstReferenceMacro(ReverseOrdering,
bool);
94 itkBooleanMacro(ReverseOrdering);
120 return m_Accessor(a) < m_Accessor(b);
136 return m_Accessor(a) > m_Accessor(b);
147 bool m_ReverseOrdering{};
154#ifndef ITK_MANUAL_INSTANTIATION
155# include "itkAttributeKeepNObjectsLabelMapFilter.hxx"
AttributeAccessorType m_Accessor
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
AttributeAccessorType m_Accessor
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
keep N objects according to their attribute value
typename AttributeAccessorType::AttributeValueType AttributeValueType
~AttributeKeepNObjectsLabelMapFilter() override=default
typename ImageType::LabelObjectType LabelObjectType
TAttributeAccessor AttributeAccessorType
typename ImageType::Pointer ImagePointer
void GenerateData() override
void PrintSelf(std::ostream &os, Indent indent) const override
AttributeKeepNObjectsLabelMapFilter()
typename ImageType::IndexType IndexType
typename ImageType::PixelType PixelType
typename ImageType::ConstPointer ImageConstPointer
Base class for filters that takes an image as input and overwrites that image as the output.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType