ITK  6.0.0
Insight Toolkit
itkBinaryFillholeImageFilter.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 itkBinaryFillholeImageFilter_h
19 #define itkBinaryFillholeImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
25 
45 template <typename TInputImage>
46 class ITK_TEMPLATE_EXPORT BinaryFillholeImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
47 {
48 public:
49  ITK_DISALLOW_COPY_AND_MOVE(BinaryFillholeImageFilter);
50 
56 
58  using InputImageType = TInputImage;
59  using OutputImageType = TInputImage;
63  using InputImagePixelType = typename InputImageType::PixelType;
67  using OutputImagePixelType = typename OutputImageType::PixelType;
68 
70  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
71  static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
72 
74  itkNewMacro(Self);
75 
77  itkOverrideGetNameOfClassMacro(BinaryFillholeImageFilter);
78 
85  itkSetMacro(FullyConnected, bool);
86  itkGetConstReferenceMacro(FullyConnected, bool);
87  itkBooleanMacro(FullyConnected);
90 #ifdef ITK_USE_CONCEPT_CHECKING
91  // Begin concept checking
93  // End concept checking
94 #endif
95 
98  itkSetMacro(ForegroundValue, InputImagePixelType);
99 
102  itkGetMacro(ForegroundValue, InputImagePixelType);
103 
104 protected:
106  ~BinaryFillholeImageFilter() override = default;
107  void
108  PrintSelf(std::ostream & os, Indent indent) const override;
109 
113  void
114  GenerateInputRequestedRegion() override;
115 
117  void
118  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
119 
122  void
123  GenerateData() override;
124 
125 private:
126  InputImagePixelType m_ForegroundValue{};
127 
128  bool m_FullyConnected{};
129 
130 }; // end of class
131 
132 } // end namespace itk
133 
134 #ifndef ITK_MANUAL_INSTANTIATION
135 # include "itkBinaryFillholeImageFilter.hxx"
136 #endif
137 
138 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:639
itk::BinaryFillholeImageFilter::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkBinaryFillholeImageFilter.h:67
itk::BinaryFillholeImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkBinaryFillholeImageFilter.h:62
itk::BinaryFillholeImageFilter
Remove holes not connected to the boundary of the image.
Definition: itkBinaryFillholeImageFilter.h:46
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BinaryFillholeImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkBinaryFillholeImageFilter.h:65
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::BinaryFillholeImageFilter::InputImageType
TInputImage InputImageType
Definition: itkBinaryFillholeImageFilter.h:58
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::BinaryFillholeImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkBinaryFillholeImageFilter.h:66
itkImageToImageFilter.h
itk::BinaryFillholeImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkBinaryFillholeImageFilter.h:63
itk::BinaryFillholeImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkBinaryFillholeImageFilter.h:61
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::BinaryFillholeImageFilter::OutputImageType
TInputImage OutputImageType
Definition: itkBinaryFillholeImageFilter.h:59
itk::BinaryFillholeImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkBinaryFillholeImageFilter.h:60
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293
itk::BinaryFillholeImageFilter::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkBinaryFillholeImageFilter.h:64