ITK  6.0.0
Insight Toolkit
itkLabelShapeOpeningImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkLabelShapeOpeningImageFilter_h
19#define itkLabelShapeOpeningImageFilter_h
20
21#include "itkShapeLabelObject.h"
26
27namespace itk
28{
46template <typename TInputImage>
47class ITK_TEMPLATE_EXPORT LabelShapeOpeningImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(LabelShapeOpeningImageFilter);
51
57
59 using InputImageType = TInputImage;
60 using OutputImageType = TInputImage;
64 using InputImagePixelType = typename InputImageType::PixelType;
68 using OutputImagePixelType = typename OutputImageType::PixelType;
69
71 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
72 static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
73 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
74
83
85 itkNewMacro(Self);
86
88 itkOverrideGetNameOfClassMacro(LabelShapeOpeningImageFilter);
89
90#ifdef ITK_USE_CONCEPT_CHECKING
91 // Begin concept checking
95 // End concept checking
96#endif
97
102 itkSetMacro(BackgroundValue, OutputImagePixelType);
103 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
109 itkGetConstMacro(Lambda, double);
110 itkSetMacro(Lambda, double);
119 itkGetConstMacro(ReverseOrdering, bool);
120 itkSetMacro(ReverseOrdering, bool);
121 itkBooleanMacro(ReverseOrdering);
128 itkGetConstMacro(Attribute, AttributeType);
129 itkSetMacro(Attribute, AttributeType);
130 void
131 SetAttribute(const std::string & s)
132 {
133 this->SetAttribute(LabelObjectType::GetAttributeFromName(s));
134 }
137protected:
139 ~LabelShapeOpeningImageFilter() override = default;
140 void
141 PrintSelf(std::ostream & os, Indent indent) const override;
142
146 void
148
150 void
151 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
152
155 void
156 GenerateData() override;
157
158private:
159 OutputImagePixelType m_BackgroundValue{};
160 double m_Lambda{};
161 bool m_ReverseOrdering{};
162 AttributeType m_Attribute{};
163}; // end of class
164} // end namespace itk
165
166#ifndef ITK_MANUAL_INSTANTIATION
167# include "itkLabelShapeOpeningImageFilter.hxx"
168#endif
169
170#endif
Base class for all data objects in ITK.
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
convert a labeled image to a label collection image
Converts a LabelMap to a labeled image.
Templated n-dimensional image to store labeled objects.
Definition: itkLabelMap.h:71
unsigned int AttributeType
remove the objects according to the value of their shape attribute
typename InputImageType::PixelType InputImagePixelType
~LabelShapeOpeningImageFilter() override=default
typename LabelObjectType::AttributeType AttributeType
typename InputImageType::RegionType InputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
typename InputImageType::Pointer InputImagePointer
typename InputImageType::ConstPointer InputImageConstPointer
void GenerateInputRequestedRegion() override
void EnlargeOutputRequestedRegion(DataObject *) override
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::Pointer OutputImagePointer
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::ConstPointer OutputImageConstPointer
Light weight base class for most itk classes.
The valuator class for the ShapeLabelObject.
A Label object to store the common attributes related to the shape of the object.
Remove objects according to the value of their shape attribute.
SmartPointer< const Self > ConstPointer
SmartPointer< Self > Pointer
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....