ITK  4.2.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< class TInputImage, class TOutputImage,
76  class TFunction1, class 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 
142  itkConceptMacro( InputHasPixelTraitsCheck,
144  itkConceptMacro( InputHasNumericTraitsCheck,
146 
148 #endif
149 protected:
152  void PrintSelf(std::ostream & os, Indent indent) const;
154 
158  void GenerateInputRequestedRegion();
159 
161  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) );
162 
163  void GenerateData();
164 
165 private:
166  ValuedRegionalExtremaImageFilter(const Self &); //purposely not implemented
167  void operator=(const Self &); //purposely not implemented
168 
169  typename TInputImage::PixelType m_MarkerValue;
170 
172  bool m_Flat;
173 
174  typedef typename OutputImageType::IndexType OutIndexType;
175  typedef typename InputImageType::IndexType InIndexType;
178  typedef std::stack< OutIndexType > IndexStack;
179 }; // end of class
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkValuedRegionalExtremaImageFilter.hxx"
184 #endif
185 
186 #endif
187