ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBinaryShapeOpeningImageFilter.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 itkBinaryShapeOpeningImageFilter_h
19#define itkBinaryShapeOpeningImageFilter_h
20
21#include "itkShapeLabelObject.h"
26
27namespace itk
28{
46template <typename TInputImage>
47class ITK_TEMPLATE_EXPORT BinaryShapeOpeningImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
48{
49public:
50 ITK_DISALLOW_COPY_AND_MOVE(BinaryShapeOpeningImageFilter);
51
57
59 using InputImageType = TInputImage;
60 using OutputImageType = TInputImage;
61 using InputImagePointer = typename InputImageType::Pointer;
62 using InputImageConstPointer = typename InputImageType::ConstPointer;
63 using InputImageRegionType = typename InputImageType::RegionType;
64 using InputImagePixelType = typename InputImageType::PixelType;
65 using OutputImagePointer = typename OutputImageType::Pointer;
66 using OutputImageConstPointer = typename OutputImageType::ConstPointer;
67 using OutputImageRegionType = typename OutputImageType::RegionType;
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
76
85
87 itkNewMacro(Self);
88
90 itkOverrideGetNameOfClassMacro(BinaryShapeOpeningImageFilter);
91
98 itkSetMacro(FullyConnected, bool);
99 itkGetConstReferenceMacro(FullyConnected, bool);
100 itkBooleanMacro(FullyConnected);
102
106
111 itkSetMacro(BackgroundValue, OutputImagePixelType);
112 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
114
119 itkSetMacro(ForegroundValue, OutputImagePixelType);
120 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
122
126 itkGetConstMacro(Lambda, double);
127 itkSetMacro(Lambda, double);
129
136 itkGetConstMacro(ReverseOrdering, bool);
137 itkSetMacro(ReverseOrdering, bool);
138 itkBooleanMacro(ReverseOrdering);
140
145 itkGetConstMacro(Attribute, AttributeType);
146 itkSetMacro(Attribute, AttributeType);
147 void
148 SetAttribute(const std::string & s)
149 {
151 }
152
153
154protected:
156 ~BinaryShapeOpeningImageFilter() override = default;
157 void
158 PrintSelf(std::ostream & os, Indent indent) const override;
159
162 void
164
166 void
167 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
168
171 void
172 GenerateData() override;
173
174private:
178 double m_Lambda{};
181}; // end of class
182} // end namespace itk
183
184#ifndef ITK_MANUAL_INSTANTIATION
185# include "itkBinaryShapeOpeningImageFilter.hxx"
186#endif
187
188#endif
Label the connected components in a binary image and produce a collection of label objects.
~BinaryShapeOpeningImageFilter() override=default
typename OutputImageType::RegionType OutputImageRegionType
void EnlargeOutputRequestedRegion(DataObject *output) override
ShapeOpeningLabelMapFilter< LabelMapType > OpeningType
typename InputImageType::RegionType InputImageRegionType
ImageToImageFilter< TInputImage, TInputImage > Superclass
void GenerateInputRequestedRegion() override
typename OutputImageType::PixelType OutputImagePixelType
typename OutputImageType::ConstPointer OutputImageConstPointer
Image< typename OutputImageType::PixelType, Self::OutputImageDimension > ShapeLabelFilterOutput
BinaryImageToLabelMapFilter< InputImageType, LabelMapType > LabelizerType
void PrintSelf(std::ostream &os, Indent indent) const override
typename InputImageType::Pointer InputImagePointer
ShapeLabelObject< LabelType, Self::ImageDimension > LabelObjectType
virtual void SetAttribute(AttributeType _arg)
typename OutputImageType::Pointer OutputImagePointer
LabelMapToBinaryImageFilter< LabelMapType, OutputImageType > BinarizerType
typename LabelObjectType::AttributeType AttributeType
typename InputImageType::ConstPointer InputImageConstPointer
typename InputImageType::PixelType InputImagePixelType
ShapeLabelMapFilter< LabelMapType, ShapeLabelFilterOutput > LabelObjectValuatorType
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
Convert a LabelMap to a binary image.
Templated n-dimensional image to store labeled objects.
Definition itkLabelMap.h:71
The valuator class for the ShapeLabelObject.
A Label object to store the common attributes related to the shape of the object.
static AttributeType GetAttributeFromName(const std::string &s)
Remove objects according to the value of their shape attribute.
Implements transparent reference counting.
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86