18#ifndef itkBinaryStatisticsKeepNObjectsImageFilter_h
19#define itkBinaryStatisticsKeepNObjectsImageFilter_h
45template <
typename TInputImage,
typename TFeatureImage>
75 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
76 static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
77 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
101 itkSetMacro(FullyConnected,
bool);
102 itkGetConstReferenceMacro(FullyConnected,
bool);
103 itkBooleanMacro(FullyConnected);
106#ifdef ITK_USE_CONCEPT_CHECKING
142 itkGetConstMacro(ReverseOrdering,
bool);
143 itkSetMacro(ReverseOrdering,
bool);
144 itkBooleanMacro(ReverseOrdering);
156 this->SetAttribute(LabelObjectType::GetAttributeFromName(s));
165 this->SetNthInput(1,
const_cast<TFeatureImage *
>(input));
169 const FeatureImageType *
179 this->SetInput(input);
186 this->SetFeatureImage(input);
211 bool m_FullyConnected{
false };
215 bool m_ReverseOrdering{
false };
220#ifndef ITK_MANUAL_INSTANTIATION
221# include "itkBinaryStatisticsKeepNObjectsImageFilter.hxx"
Label the connected components in a binary image and produce a collection of label objects.
keep N objects according to their statistics attributes
TFeatureImage FeatureImageType
typename InputImageType::Pointer InputImagePointer
void SetInput1(const InputImageType *input)
void GenerateInputRequestedRegion() override
typename InputImageType::RegionType InputImageRegionType
TInputImage InputImageType
typename OutputImageType::ConstPointer OutputImageConstPointer
typename InputImageType::PixelType InputImagePixelType
typename FeatureImageType::ConstPointer FeatureImageConstPointer
typename FeatureImageType::Pointer FeatureImagePointer
void GenerateData() override
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputImageType::PixelType OutputImagePixelType
const FeatureImageType * GetFeatureImage()
typename FeatureImageType::PixelType FeatureImagePixelType
BinaryStatisticsKeepNObjectsImageFilter()
void PrintSelf(std::ostream &os, Indent indent) const override
void SetFeatureImage(const TFeatureImage *input)
typename OutputImageType::RegionType OutputImageRegionType
typename LabelObjectType::AttributeType AttributeType
TInputImage OutputImageType
~BinaryStatisticsKeepNObjectsImageFilter() override=default
void EnlargeOutputRequestedRegion(DataObject *) override
typename OutputImageType::Pointer OutputImagePointer
void SetAttribute(const std::string &s)
void SetInput2(const FeatureImageType *input)
Base class for all data objects in ITK.
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Convert a LabelMap to a binary image.
Templated n-dimensional image to store labeled objects.
unsigned int AttributeType
Light weight base class for most itk classes.
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
keep N objects according to their statistics attributes
The valuator class for the StatisticsLabelObject.
A Label object to store the common attributes related to the statistics of the object.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
ImageBaseType::RegionType RegionType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType