ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkValuedRegionalExtremaImageFilter.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 itkValuedRegionalExtremaImageFilter_h
19 #define itkValuedRegionalExtremaImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
24 #include <stack>
25 
26 namespace itk
27 {
77 template< typename TInputImage, typename TOutputImage,
78  typename TFunction1, typename TFunction2 >
79 class ITK_TEMPLATE_EXPORT ValuedRegionalExtremaImageFilter:
80  public ImageToImageFilter< TInputImage, TOutputImage >
81 {
82 public:
88 
90  typedef TInputImage InputImageType;
91  typedef TOutputImage OutputImageType;
92  typedef typename InputImageType::Pointer InputImagePointer;
93  typedef typename InputImageType::ConstPointer InputImageConstPointer;
94  typedef typename InputImageType::RegionType InputImageRegionType;
95  typedef typename InputImageType::PixelType InputImagePixelType;
97  typedef typename OutputImageType::Pointer OutputImagePointer;
98  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
99  typedef typename OutputImageType::RegionType OutputImageRegionType;
100  typedef typename OutputImageType::PixelType OutputImagePixelType;
101 
103  itkStaticConstMacro(InputImageDimension, unsigned int,
104  TInputImage::ImageDimension);
105  itkStaticConstMacro(OutputImageDimension, unsigned int,
106  TOutputImage::ImageDimension);
108 
110  itkNewMacro(Self);
111 
114 
121  itkSetMacro(FullyConnected, bool);
122  itkGetConstReferenceMacro(FullyConnected, bool);
123  itkBooleanMacro(FullyConnected);
125 
129  itkSetMacro(MarkerValue, typename TInputImage::PixelType);
130  itkGetConstReferenceMacro(MarkerValue, typename TInputImage::PixelType);
132 
136  itkGetConstMacro(Flat, bool);
137 
138 #ifdef ITK_USE_CONCEPT_CHECKING
139  // Begin concept checking
140  itkConceptMacro( InputHasPixelTraitsCheck,
142  itkConceptMacro( InputHasNumericTraitsCheck,
144  // End concept checking
145 #endif
146 
147 protected:
150  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
151 
155  void GenerateInputRequestedRegion() ITK_OVERRIDE;
156 
158  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
159 
160  void GenerateData() ITK_OVERRIDE;
161 
162 private:
163  ITK_DISALLOW_COPY_AND_ASSIGN(ValuedRegionalExtremaImageFilter);
164 
165  typename TInputImage::PixelType m_MarkerValue;
166 
167  bool m_FullyConnected;
168  bool m_Flat;
169 
174  typedef std::stack< OutIndexType > IndexStack;
175 }; // end of class
176 } // end namespace itk
177 
178 #ifndef ITK_MANUAL_INSTANTIATION
179 #include "itkValuedRegionalExtremaImageFilter.hxx"
180 #endif
181 
182 #endif
Uses a flooding algorithm to set all voxels that are not a regional extrema to the max or min of the ...
Const version of ShapedNeighborhoodIterator, defining iteration of a local N-dimensional neighborhood...
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
A neighborhood iterator which can take on an arbitrary shape.
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
TOutputImage OutputImageType
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.