ITK  5.1.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  * http://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 
46 template <typename TInputImage>
47 class ITK_TEMPLATE_EXPORT BinaryFillholeImageFilter : public ImageToImageFilter<TInputImage, TInputImage>
48 {
49 public:
50  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryFillholeImageFilter);
51 
57 
59  using InputImageType = TInputImage;
60  using OutputImageType = TInputImage;
61  using InputImagePointer = typename InputImageType::Pointer;
62  using InputImageConstPointer = typename InputImageType::ConstPointer;
64  using InputImagePixelType = typename InputImageType::PixelType;
65  using OutputImagePointer = typename OutputImageType::Pointer;
66  using OutputImageConstPointer = typename OutputImageType::ConstPointer;
68  using OutputImagePixelType = typename OutputImageType::PixelType;
69 
71  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
72  static constexpr unsigned int OutputImageDimension = OutputImageType::ImageDimension;
73 
75  itkNewMacro(Self);
76 
79 
86  itkSetMacro(FullyConnected, bool);
87  itkGetConstReferenceMacro(FullyConnected, bool);
88  itkBooleanMacro(FullyConnected);
90 
91 #ifdef ITK_USE_CONCEPT_CHECKING
92  // Begin concept checking
94  // End concept checking
95 #endif
96 
99  itkSetMacro(ForegroundValue, InputImagePixelType);
100 
103  itkGetMacro(ForegroundValue, InputImagePixelType);
104 
105 protected:
107  ~BinaryFillholeImageFilter() override = default;
108  void
109  PrintSelf(std::ostream & os, Indent indent) const override;
110 
114  void
115  GenerateInputRequestedRegion() override;
116 
118  void
119  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
120 
123  void
124  GenerateData() override;
125 
126 private:
128 
130 
131 }; // end of class
132 
133 } // end namespace itk
134 
135 #ifndef ITK_MANUAL_INSTANTIATION
136 # include "itkBinaryFillholeImageFilter.hxx"
137 #endif
138 
139 #endif
itk::Concept::OStreamWritable
Definition: itkConceptChecking.h:634
itk::BinaryFillholeImageFilter::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkBinaryFillholeImageFilter.h:68
itk::BinaryFillholeImageFilter::InputImageRegionType
typename InputImageType::RegionType InputImageRegionType
Definition: itkBinaryFillholeImageFilter.h:63
itk::BinaryFillholeImageFilter
Remove holes not connected to the boundary of the image.
Definition: itkBinaryFillholeImageFilter.h:47
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BinaryFillholeImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkBinaryFillholeImageFilter.h:66
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:59
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::BinaryFillholeImageFilter::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkBinaryFillholeImageFilter.h:67
itkImageToImageFilter.h
itk::BinaryFillholeImageFilter::InputImagePixelType
typename InputImageType::PixelType InputImagePixelType
Definition: itkBinaryFillholeImageFilter.h:64
itk::BinaryFillholeImageFilter::m_FullyConnected
bool m_FullyConnected
Definition: itkBinaryFillholeImageFilter.h:129
itk::BinaryFillholeImageFilter::InputImageConstPointer
typename InputImageType::ConstPointer InputImageConstPointer
Definition: itkBinaryFillholeImageFilter.h:62
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkArray.h:26
itk::BinaryFillholeImageFilter::OutputImageType
TInputImage OutputImageType
Definition: itkBinaryFillholeImageFilter.h:60
itk::BinaryFillholeImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkBinaryFillholeImageFilter.h:61
itk::BinaryFillholeImageFilter::m_ForegroundValue
InputImagePixelType m_ForegroundValue
Definition: itkBinaryFillholeImageFilter.h:127
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293
itk::BinaryFillholeImageFilter::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkBinaryFillholeImageFilter.h:65