ITK  4.3.0
Insight Segmentation and Registration Toolkit
itkMultiResolutionPyramidImageFilter.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 __itkMultiResolutionPyramidImageFilter_h
19 #define __itkMultiResolutionPyramidImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkArray2D.h"
23 
24 namespace itk
25 {
108 template<
109  class TInputImage,
110  class TOutputImage
111  >
113  public ImageToImageFilter< TInputImage, TOutputImage >
114 {
115 public:
121 
123  itkNewMacro(Self);
124 
127 
130 
132  itkStaticConstMacro(ImageDimension, unsigned int,
133  TInputImage::ImageDimension);
134  itkStaticConstMacro(OutputImageDimension, unsigned int,
135  TOutputImage::ImageDimension);
137 
139  typedef typename Superclass::InputImageType InputImageType;
140  typedef typename Superclass::OutputImageType OutputImageType;
141  typedef typename Superclass::InputImagePointer InputImagePointer;
142  typedef typename Superclass::OutputImagePointer OutputImagePointer;
143  typedef typename Superclass::InputImageConstPointer InputImageConstPointer;
144 
151  virtual void SetNumberOfLevels(unsigned int num);
152 
154  itkGetConstMacro(NumberOfLevels, unsigned int);
155 
162  virtual void SetSchedule(const ScheduleType & schedule);
163 
165  itkGetConstReferenceMacro(Schedule, ScheduleType);
166 
171  virtual void SetStartingShrinkFactors(unsigned int factor);
172 
173  virtual void SetStartingShrinkFactors(unsigned int *factors);
174 
176  const unsigned int * GetStartingShrinkFactors() const;
177 
181  static bool IsScheduleDownwardDivisible(const ScheduleType & schedule);
182 
189  virtual void GenerateOutputInformation();
190 
195  virtual void GenerateOutputRequestedRegion(DataObject *output);
197 
204  virtual void GenerateInputRequestedRegion();
205 
206  itkSetMacro(MaximumError, double);
207  itkGetConstReferenceMacro(MaximumError, double);
208 
209  itkSetMacro(UseShrinkImageFilter, bool);
210  itkGetConstMacro(UseShrinkImageFilter, bool);
211  itkBooleanMacro(UseShrinkImageFilter);
212 
213 #ifdef ITK_USE_CONCEPT_CHECKING
214 
215  itkConceptMacro( SameDimensionCheck,
217  itkConceptMacro( OutputHasNumericTraitsCheck,
219 
221 #endif
222 
223 protected:
226  void PrintSelf(std::ostream & os, Indent indent) const;
227 
229  void GenerateData();
230 
232 
233  unsigned int m_NumberOfLevels;
235 
237 
238 private:
239  MultiResolutionPyramidImageFilter(const Self &); //purposely not implemented
240  void operator=(const Self &); //purposely not implemented
241 };
242 } // namespace itk
243 
244 #ifndef ITK_MANUAL_INSTANTIATION
245 #include "itkMultiResolutionPyramidImageFilter.hxx"
246 #endif
247 
248 #endif
249