ITK  6.0.0
Insight Toolkit
itkGrayscaleGeodesicErodeImageFilter.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 itkGrayscaleGeodesicErodeImageFilter_h
19 #define itkGrayscaleGeodesicErodeImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
64 template <typename TInputImage, typename TOutputImage>
65 class ITK_TEMPLATE_EXPORT GrayscaleGeodesicErodeImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
66 {
67 public:
68  ITK_DISALLOW_COPY_AND_MOVE(GrayscaleGeodesicErodeImageFilter);
69 
75 
77  using MarkerImageType = TInputImage;
81  using MarkerImagePixelType = typename MarkerImageType::PixelType;
82  using MaskImageType = TInputImage;
86  using MaskImagePixelType = typename MaskImageType::PixelType;
87  using OutputImageType = TOutputImage;
91  using OutputImagePixelType = typename OutputImageType::PixelType;
92 
94  static constexpr unsigned int MarkerImageDimension = TInputImage::ImageDimension;
95  static constexpr unsigned int MaskImageDimension = TInputImage::ImageDimension;
96  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
97 
99  itkNewMacro(Self);
100 
102  itkOverrideGetNameOfClassMacro(GrayscaleGeodesicErodeImageFilter);
103 
107  void
108  SetMarkerImage(const MarkerImageType *);
109 
110  const MarkerImageType *
111  GetMarkerImage();
112 
116  void
117  SetMaskImage(const MaskImageType *);
118 
119  const MaskImageType *
120  GetMaskImage();
121 
125  itkSetMacro(RunOneIteration, bool);
126  itkGetConstMacro(RunOneIteration, bool);
127  itkBooleanMacro(RunOneIteration);
132  itkGetConstMacro(NumberOfIterationsUsed, unsigned long);
133 
140  itkSetMacro(FullyConnected, bool);
141  itkGetConstReferenceMacro(FullyConnected, bool);
142  itkBooleanMacro(FullyConnected);
145 #ifdef ITK_USE_CONCEPT_CHECKING
146  // Begin concept checking
150  // End concept checking
151 #endif
152 
153 protected:
155  ~GrayscaleGeodesicErodeImageFilter() override = default;
156  void
157  PrintSelf(std::ostream & os, Indent indent) const override;
158 
165  void
166  GenerateInputRequestedRegion() override;
167 
172  void
173  EnlargeOutputRequestedRegion(DataObject * itkNotUsed(output)) override;
174 
181  void
182  GenerateData() override;
183 
188  void
189  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
190 
191 
192 private:
193  bool m_RunOneIteration{};
194  unsigned long m_NumberOfIterationsUsed{};
195  bool m_FullyConnected{};
196 }; // end of class
197 } // end namespace itk
198 
199 #ifndef ITK_MANUAL_INSTANTIATION
200 # include "itkGrayscaleGeodesicErodeImageFilter.hxx"
201 #endif
202 
203 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
itk::GrayscaleGeodesicErodeImageFilter::MaskImageType
TInputImage MaskImageType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:82
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:94
itk::ImageSource::OutputImagePointer
typename OutputImageType::Pointer OutputImagePointer
Definition: itkImageSource.h:91
itk::GrayscaleGeodesicErodeImageFilter::MarkerImagePointer
typename MarkerImageType::Pointer MarkerImagePointer
Definition: itkGrayscaleGeodesicErodeImageFilter.h:78
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::GrayscaleGeodesicErodeImageFilter
geodesic gray scale erosion of an image
Definition: itkGrayscaleGeodesicErodeImageFilter.h:65
itk::GrayscaleGeodesicErodeImageFilter::MaskImagePixelType
typename MaskImageType::PixelType MaskImagePixelType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:86
itk::GrayscaleGeodesicErodeImageFilter::MarkerImagePixelType
typename MarkerImageType::PixelType MarkerImagePixelType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:81
itk::GrayscaleGeodesicErodeImageFilter::MaskImageConstPointer
typename MaskImageType::ConstPointer MaskImageConstPointer
Definition: itkGrayscaleGeodesicErodeImageFilter.h:84
itk::Concept::SameDimension
Definition: itkConceptChecking.h:696
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::GrayscaleGeodesicErodeImageFilter::MarkerImageType
TInputImage MarkerImageType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:77
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::GrayscaleGeodesicErodeImageFilter::MaskImagePointer
typename MaskImageType::Pointer MaskImagePointer
Definition: itkGrayscaleGeodesicErodeImageFilter.h:83
itkImageToImageFilter.h
itk::Concept::Comparable
Definition: itkConceptChecking.h:331
itk::GrayscaleGeodesicErodeImageFilter::MaskImageRegionType
typename MaskImageType::RegionType MaskImageRegionType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:85
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
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::GrayscaleGeodesicErodeImageFilter::OutputImageConstPointer
typename OutputImageType::ConstPointer OutputImageConstPointer
Definition: itkGrayscaleGeodesicErodeImageFilter.h:89
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::ImageSource::OutputImagePixelType
typename OutputImageType::PixelType OutputImagePixelType
Definition: itkImageSource.h:93
itk::Concept::Convertible
Definition: itkConceptChecking.h:216
itk::GrayscaleGeodesicErodeImageFilter::MarkerImageRegionType
typename MarkerImageType::RegionType MarkerImageRegionType
Definition: itkGrayscaleGeodesicErodeImageFilter.h:80
itk::GrayscaleGeodesicErodeImageFilter::MarkerImageConstPointer
typename MarkerImageType::ConstPointer MarkerImageConstPointer
Definition: itkGrayscaleGeodesicErodeImageFilter.h:79
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293