18 #ifndef itkAttributeKeepNObjectsLabelMapFilter_h
19 #define itkAttributeKeepNObjectsLabelMapFilter_h
41 template<
typename TImage,
typename TAttributeAccessor=
42 typename Functor::AttributeLabelObjectAccessor< typename TImage::LabelObjectType > >
67 static constexpr
unsigned int ImageDimension = TImage::ImageDimension;
76 #ifdef ITK_USE_CONCEPT_CHECKING
92 itkSetMacro( ReverseOrdering,
bool );
93 itkGetConstReferenceMacro( ReverseOrdering,
bool );
94 itkBooleanMacro( ReverseOrdering );
108 void GenerateData()
override;
110 void PrintSelf(std::ostream& os,
Indent indent)
const override;
115 bool operator()(
const typename LabelObjectType::Pointer & a,
const typename LabelObjectType::Pointer & b )
117 return m_Accessor( a ) < m_Accessor( b );
127 bool operator()(
const typename LabelObjectType::Pointer & a,
const typename LabelObjectType::Pointer & b )
129 return m_Accessor( a ) > m_Accessor( b );
144 #ifndef ITK_MANUAL_INSTANTIATION
145 #include "itkAttributeKeepNObjectsLabelMapFilter.hxx"
Light weight base class for most itk classes.
AttributeAccessorType m_Accessor
unsigned long SizeValueType
TAttributeAccessor AttributeAccessorType
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
typename ImageType::LabelObjectType LabelObjectType
ImageBaseType::IndexType IndexType
Base class for filters that takes an image as input and overwrites that image as the output...
typename AttributeAccessorType::AttributeValueType AttributeValueType
typename ImageType::IndexType IndexType
AttributeAccessorType m_Accessor
Control indentation during Print() invocation.
typename ImageType::ConstPointer ImageConstPointer
bool operator()(const typename LabelObjectType::Pointer &a, const typename LabelObjectType::Pointer &b)
typename ImageType::Pointer ImagePointer
typename ImageType::PixelType PixelType
SizeValueType m_NumberOfObjects
keep N objects according to their attribute value