ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkBinaryStatisticsOpeningImageFilter.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 itkBinaryStatisticsOpeningImageFilter_h
19#define itkBinaryStatisticsOpeningImageFilter_h
20
25
26namespace itk
27{
49template <typename TInputImage, typename TFeatureImage>
50class ITK_TEMPLATE_EXPORT BinaryStatisticsOpeningImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(BinaryStatisticsOpeningImageFilter);
54
60
62 using InputImageType = TInputImage;
63 using OutputImageType = TInputImage;
64 using InputImagePointer = typename InputImageType::Pointer;
65 using InputImageConstPointer = typename InputImageType::ConstPointer;
66 using InputImageRegionType = typename InputImageType::RegionType;
67 using InputImagePixelType = typename InputImageType::PixelType;
68 using OutputImagePointer = typename OutputImageType::Pointer;
69 using OutputImageConstPointer = typename OutputImageType::ConstPointer;
70 using OutputImageRegionType = typename OutputImageType::RegionType;
71 using OutputImagePixelType = typename OutputImageType::PixelType;
72
73 using FeatureImageType = TFeatureImage;
74 using FeatureImagePointer = typename FeatureImageType::Pointer;
75 using FeatureImageConstPointer = typename FeatureImageType::ConstPointer;
76 using FeatureImagePixelType = typename FeatureImageType::PixelType;
77
79 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
80 static constexpr unsigned int OutputImageDimension = TInputImage::ImageDimension;
81 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
82
84
92
94 itkNewMacro(Self);
95
97 itkOverrideGetNameOfClassMacro(BinaryStatisticsOpeningImageFilter);
98
105 itkSetMacro(FullyConnected, bool);
106 itkGetConstReferenceMacro(FullyConnected, bool);
107 itkBooleanMacro(FullyConnected);
109
113
118 itkSetMacro(BackgroundValue, OutputImagePixelType);
119 itkGetConstMacro(BackgroundValue, OutputImagePixelType);
121
126 itkSetMacro(ForegroundValue, OutputImagePixelType);
127 itkGetConstMacro(ForegroundValue, OutputImagePixelType);
129
133 itkGetConstMacro(Lambda, double);
134 itkSetMacro(Lambda, double);
136
143 itkGetConstMacro(ReverseOrdering, bool);
144 itkSetMacro(ReverseOrdering, bool);
145 itkBooleanMacro(ReverseOrdering);
147
152 itkGetConstMacro(Attribute, AttributeType);
153 itkSetMacro(Attribute, AttributeType);
154 void
155 SetAttribute(const std::string & s)
156 {
158 }
159
160
162 void
163 SetFeatureImage(const TFeatureImage * input)
164 {
165 // Process object is not const-correct so the const casting is required.
166 this->SetNthInput(1, const_cast<TFeatureImage *>(input));
167 }
168
170 const FeatureImageType *
172 {
173 return static_cast<const FeatureImageType *>(this->ProcessObject::GetInput(1));
174 }
175
177 void
179 {
180 this->SetInput(input);
181 }
182
184 void
186 {
187 this->SetFeatureImage(input);
188 }
189
190protected:
193 void
194 PrintSelf(std::ostream & os, Indent indent) const override;
195
198 void
200
202 void
203 EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
204
207 void
208 GenerateData() override;
209
210private:
214 double m_Lambda{};
217}; // end of class
218} // end namespace itk
219
220#ifndef ITK_MANUAL_INSTANTIATION
221# include "itkBinaryStatisticsOpeningImageFilter.hxx"
222#endif
223
224#endif
Label the connected components in a binary image and produce a collection of label objects.
BinaryImageToLabelMapFilter< InputImageType, LabelMapType > LabelizerType
virtual void SetAttribute(AttributeType _arg)
typename InputImageType::ConstPointer InputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
void PrintSelf(std::ostream &os, Indent indent) const override
StatisticsLabelMapFilter< LabelMapType, FeatureImageType > LabelObjectValuatorType
ImageToImageFilter< TInputImage, TInputImage > Superclass
typename FeatureImageType::ConstPointer FeatureImageConstPointer
StatisticsOpeningLabelMapFilter< LabelMapType > OpeningType
StatisticsLabelObject< LabelType, Self::ImageDimension > LabelObjectType
LabelMapToBinaryImageFilter< LabelMapType, OutputImageType > BinarizerType
typename LabelObjectType::AttributeType AttributeType
~BinaryStatisticsOpeningImageFilter() override=default
void EnlargeOutputRequestedRegion(DataObject *output) override
Base class for all data objects in ITK.
virtual void SetInput(const InputImageType *input)
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
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
Implements transparent reference counting.
The valuator class for the StatisticsLabelObject.
A Label object to store the common attributes related to the statistics of the object.
remove the objects according to the value of their statistics attribute
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType
Definition itkIntTypes.h:86