18 #ifndef itkBinaryStatisticsKeepNObjectsImageFilter_h
19 #define itkBinaryStatisticsKeepNObjectsImageFilter_h
45 template<
typename TInputImage,
typename TFeatureImage >
76 static constexpr
unsigned int InputImageDimension = TInputImage::ImageDimension;
77 static constexpr
unsigned int OutputImageDimension = TInputImage::ImageDimension;
78 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
103 itkSetMacro(FullyConnected,
bool);
104 itkGetConstReferenceMacro(FullyConnected,
bool);
105 itkBooleanMacro(FullyConnected);
108 #ifdef ITK_USE_CONCEPT_CHECKING
147 itkGetConstMacro(ReverseOrdering,
bool);
148 itkSetMacro(ReverseOrdering,
bool);
149 itkBooleanMacro(ReverseOrdering);
160 this->SetAttribute( LabelObjectType::GetAttributeFromName(s) );
168 this->SetNthInput( 1, const_cast< TFeatureImage * >( input ) );
180 this->SetInput(input);
186 this->SetFeatureImage(input);
192 void PrintSelf(std::ostream & os,
Indent indent)
const override;
197 void GenerateInputRequestedRegion()
override;
200 void EnlargeOutputRequestedRegion(
DataObject *itkNotUsed(output) )
override;
204 void GenerateData()
override;
207 bool m_FullyConnected{
false};
211 bool m_ReverseOrdering{
false};
216 #ifndef ITK_MANUAL_INSTANTIATION
217 #include "itkBinaryStatisticsKeepNObjectsImageFilter.hxx"
const FeatureImageType * GetFeatureImage()
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputImageType::Pointer OutputImagePointer
Light weight base class for most itk classes.
typename LabelObjectType::AttributeType AttributeType
typename Superclass::AttributeType AttributeType
unsigned long SizeValueType
typename FeatureImageType::ConstPointer FeatureImageConstPointer
TInputImage InputImageType
AttributeType m_Attribute
void SetFeatureImage(const TFeatureImage *input)
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::RegionType OutputImageRegionType
TInputImage OutputImageType
typename InputImageType::RegionType InputImageRegionType
OutputImagePixelType m_BackgroundValue
A Label object to store the common attributes related to the statistics of the object.
void SetInput2(const FeatureImageType *input)
OutputImagePixelType m_ForegroundValue
keep N objects according to their statistics attributes
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
typename InputImageType::Pointer InputImagePointer
keep N objects according to their statistics attributes
Label the connected components in a binary image and produce a collection of label objects...
typename InputImageType::PixelType InputImagePixelType
void SetAttribute(const std::string &s)
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
void SetInput1(const InputImageType *input)
Templated n-dimensional image to store labeled objects.
typename FeatureImageType::PixelType FeatureImagePixelType
TFeatureImage FeatureImageType
The valuator class for the StatisticsLabelObject.
typename FeatureImageType::Pointer FeatureImagePointer
ImageBaseType::RegionType RegionType
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Convert a LabelMap to a binary image.
typename OutputImageType::ConstPointer OutputImageConstPointer