ITK  4.9.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 {
75 template< typename TInputImage, typename TOutputImage,
76  typename TFunction1, typename TFunction2 >
78  public ImageToImageFilter< TInputImage, TOutputImage >
79 {
80 public:
83 
86 
89 
91  typedef TInputImage InputImageType;
92  typedef TOutputImage OutputImageType;
93  typedef typename InputImageType::Pointer InputImagePointer;
94  typedef typename InputImageType::ConstPointer InputImageConstPointer;
95  typedef typename InputImageType::RegionType InputImageRegionType;
96  typedef typename InputImageType::PixelType InputImagePixelType;
97  typedef typename InputImageType::SizeType ISizeType;
98  typedef typename OutputImageType::Pointer OutputImagePointer;
99  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
100  typedef typename OutputImageType::RegionType OutputImageRegionType;
101  typedef typename OutputImageType::PixelType OutputImagePixelType;
102 
104  itkStaticConstMacro(InputImageDimension, unsigned int,
105  TInputImage::ImageDimension);
106  itkStaticConstMacro(OutputImageDimension, unsigned int,
107  TOutputImage::ImageDimension);
109 
111  itkNewMacro(Self);
112 
116 
123  itkSetMacro(FullyConnected, bool);
124  itkGetConstReferenceMacro(FullyConnected, bool);
125  itkBooleanMacro(FullyConnected);
127 
131  itkSetMacro(MarkerValue, typename TInputImage::PixelType);
132  itkGetConstReferenceMacro(MarkerValue, typename TInputImage::PixelType);
134 
138  itkGetConstMacro(Flat, bool);
139 
140 #ifdef ITK_USE_CONCEPT_CHECKING
141  // Begin concept checking
142  itkConceptMacro( InputHasPixelTraitsCheck,
144  itkConceptMacro( InputHasNumericTraitsCheck,
146  // End concept checking
147 #endif
148 
149 protected:
152  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
153 
157  void GenerateInputRequestedRegion() ITK_OVERRIDE;
158 
160  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
161 
162  void GenerateData() ITK_OVERRIDE;
163 
164 private:
165  ValuedRegionalExtremaImageFilter(const Self &) ITK_DELETE_FUNCTION;
166  void operator=(const Self &) ITK_DELETE_FUNCTION;
167 
168  typename TInputImage::PixelType m_MarkerValue;
169 
171  bool m_Flat;
172 
173  typedef typename OutputImageType::IndexType OutIndexType;
174  typedef typename InputImageType::IndexType InIndexType;
177  typedef std::stack< OutIndexType > IndexStack;
178 }; // end of class
179 } // end namespace itk
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 #include "itkValuedRegionalExtremaImageFilter.hxx"
183 #endif
184 
185 #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.
void EnlargeOutputRequestedRegion(DataObject *) override
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
typedef(Concept::HasPixelTraits< InputImagePixelType >) InputHasPixelTraitsCheck
TOutputImage OutputImageType
void PrintSelf(std::ostream &os, Indent indent) const override
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.