ITK  6.0.0
Insight Toolkit
itkBinaryOpeningByReconstructionImageFilter.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 itkBinaryOpeningByReconstructionImageFilter_h
19 #define itkBinaryOpeningByReconstructionImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
22 
23 namespace itk
24 {
25 
48 template <typename TInputImage, typename TKernel>
50  : public KernelImageFilter<TInputImage, TInputImage, TKernel>
51 {
52 public:
53  ITK_DISALLOW_COPY_AND_MOVE(BinaryOpeningByReconstructionImageFilter);
54 
60 
62  itkNewMacro(Self);
63 
65  itkOverrideGetNameOfClassMacro(BinaryOpeningByReconstructionImageFilter);
66 
67  using InputImageType = TInputImage;
68  using OutputImageType = TInputImage;
71 
73  using PixelType = typename TInputImage::PixelType;
74 
76  using KernelType = TKernel;
77 
80  itkSetMacro(ForegroundValue, PixelType);
81 
84  itkGetMacro(ForegroundValue, PixelType);
85 
87  itkSetMacro(BackgroundValue, PixelType);
88 
90  itkGetMacro(BackgroundValue, PixelType);
91 
98  itkSetMacro(FullyConnected, bool);
99  itkGetConstReferenceMacro(FullyConnected, bool);
100  itkBooleanMacro(FullyConnected);
103 protected:
105  ~BinaryOpeningByReconstructionImageFilter() override = default;
106  void
107  PrintSelf(std::ostream & os, Indent indent) const override;
108 
114  void
115  GenerateInputRequestedRegion() override;
116 
119  void
120  GenerateData() override;
121 
122 private:
123  PixelType m_ForegroundValue{};
124 
125  PixelType m_BackgroundValue{};
126 
127  bool m_FullyConnected{};
128 
129 }; // end of class
130 
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 # include "itkBinaryOpeningByReconstructionImageFilter.hxx"
135 #endif
136 
137 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::BinaryOpeningByReconstructionImageFilter::KernelType
TKernel KernelType
Definition: itkBinaryOpeningByReconstructionImageFilter.h:76
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::BinaryOpeningByReconstructionImageFilter::PixelType
typename TInputImage::PixelType PixelType
Definition: itkBinaryOpeningByReconstructionImageFilter.h:73
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itkKernelImageFilter.h
itk::ImageToImageFilter::InputImagePointer
typename InputImageType::Pointer InputImagePointer
Definition: itkImageToImageFilter.h:130
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::KernelImageFilter
A base class for all the filters working on an arbitrary shaped neighborhood.
Definition: itkKernelImageFilter.h:41
itk::BinaryOpeningByReconstructionImageFilter
binary morphological closing of an image.
Definition: itkBinaryOpeningByReconstructionImageFilter.h:49
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90