ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkRegionalMinimaImageFilter.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 itkRegionalMinimaImageFilter_h
19 #define itkRegionalMinimaImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
51 template< typename TInputImage, typename TOutputImage >
52 class ITK_TEMPLATE_EXPORT RegionalMinimaImageFilter:
53  public ImageToImageFilter< TInputImage, TOutputImage >
54 {
55 public:
61 
63  typedef TInputImage InputImageType;
64  typedef TOutputImage OutputImageType;
65  typedef typename InputImageType::Pointer InputImagePointer;
66  typedef typename InputImageType::ConstPointer InputImageConstPointer;
67  typedef typename InputImageType::RegionType InputImageRegionType;
68  typedef typename InputImageType::PixelType InputImagePixelType;
69  typedef typename OutputImageType::Pointer OutputImagePointer;
70  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
71  typedef typename OutputImageType::RegionType OutputImageRegionType;
72  typedef typename OutputImageType::PixelType OutputImagePixelType;
73 
75  itkStaticConstMacro(InputImageDimension, unsigned int,
76  TInputImage::ImageDimension);
77  itkStaticConstMacro(OutputImageDimension, unsigned int,
78  TOutputImage::ImageDimension);
80 
82  itkNewMacro(Self);
83 
85  itkTypeMacro(RegionalMinimaImageFilter,
87 
94  itkSetMacro(FullyConnected, bool);
95  itkGetConstReferenceMacro(FullyConnected, bool);
96  itkBooleanMacro(FullyConnected);
98 
103  itkSetMacro(ForegroundValue, OutputImagePixelType);
104  itkGetConstMacro(ForegroundValue, OutputImagePixelType);
106 
111  itkSetMacro(BackgroundValue, OutputImagePixelType);
112  itkGetConstMacro(BackgroundValue, OutputImagePixelType);
114 
119  itkSetMacro(FlatIsMinima, bool);
120  itkGetConstMacro(FlatIsMinima, bool);
121  itkBooleanMacro(FlatIsMinima);
123 
124 #ifdef ITK_USE_CONCEPT_CHECKING
125  // Begin concept checking
126  itkConceptMacro( InputHasPixelTraitsCheck,
128  itkConceptMacro( InputHasNumericTraitsCheck,
130  // End concept checking
131 #endif
132 
133 protected:
135  ~RegionalMinimaImageFilter() ITK_OVERRIDE {}
136  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
137 
141  void GenerateInputRequestedRegion() ITK_OVERRIDE;
142 
144  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
145 
148  void GenerateData() ITK_OVERRIDE;
149 
150 private:
151  ITK_DISALLOW_COPY_AND_ASSIGN(RegionalMinimaImageFilter);
152 
153  bool m_FullyConnected;
154  bool m_FlatIsMinima;
155  OutputImagePixelType m_ForegroundValue;
156  OutputImagePixelType m_BackgroundValue;
157 }; // end of class
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkRegionalMinimaImageFilter.hxx"
162 #endif
163 
164 #endif
OutputImageType::ConstPointer OutputImageConstPointer
OutputImageType::PixelType OutputImagePixelType
Base class for all process objects that output image data.
OutputImageType::RegionType OutputImageRegionType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
InputImageType::RegionType InputImageRegionType
InputImageType::ConstPointer InputImageConstPointer
OutputImageType::PixelType OutputImagePixelType
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
InputImageType::PixelType InputImagePixelType
#define itkConceptMacro(name, concept)
Produce a binary image where foreground is the regional minima of the input image.
Base class for all data objects in ITK.