ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkGrayscaleConnectedOpeningImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 itkGrayscaleConnectedOpeningImageFilter_h
19 #define itkGrayscaleConnectedOpeningImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
45 template< typename TInputImage, typename TOutputImage >
46 class ITK_TEMPLATE_EXPORT GrayscaleConnectedOpeningImageFilter:
47  public ImageToImageFilter< TInputImage, TOutputImage >
48 {
49 public:
55 
57  typedef TInputImage InputImageType;
58  typedef typename InputImageType::Pointer InputImagePointer;
59  typedef typename InputImageType::ConstPointer InputImageConstPointer;
60  typedef typename InputImageType::RegionType InputImageRegionType;
61  typedef typename InputImageType::PixelType InputImagePixelType;
63  typedef TOutputImage OutputImageType;
64  typedef typename OutputImageType::Pointer OutputImagePointer;
65  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
66  typedef typename OutputImageType::RegionType OutputImageRegionType;
67  typedef typename OutputImageType::PixelType OutputImagePixelType;
68 
70  itkStaticConstMacro(InputImageDimension, unsigned int,
71  TInputImage::ImageDimension);
72  itkStaticConstMacro(OutputImageDimension, unsigned int,
73  TOutputImage::ImageDimension);
75 
77  itkNewMacro(Self);
78 
82 
84  itkSetMacro(Seed, InputImageIndexType);
85  itkGetConstMacro(Seed, InputImageIndexType);
87 
94  itkSetMacro(FullyConnected, bool);
95  itkGetConstReferenceMacro(FullyConnected, bool);
96  itkBooleanMacro(FullyConnected);
98 
99 #ifdef ITK_USE_CONCEPT_CHECKING
100  // Begin concept checking
101  itkConceptMacro( InputEqualityComparableCheck,
103  itkConceptMacro( InputConvertibleToOutputCheck,
105  itkConceptMacro( InputOStreamWritableCheck,
107  // End concept checking
108 #endif
109 
110 protected:
113  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
114 
118  void GenerateInputRequestedRegion() ITK_OVERRIDE;
119 
121  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
122 
125  void GenerateData() ITK_OVERRIDE;
126 
127 private:
128  ITK_DISALLOW_COPY_AND_ASSIGN(GrayscaleConnectedOpeningImageFilter);
129 
130  unsigned long m_NumberOfIterationsUsed;
132 
133  bool m_FullyConnected;
134 }; // end of class
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkGrayscaleConnectedOpeningImageFilter.hxx"
139 #endif
140 
141 #endif
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
Enhance pixels associated with a bright object (identified by a seed pixel) where the bright object i...
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.