ITK  4.13.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  typename TInputImage,
110  typename TOutputImage
111  >
112 class ITK_TEMPLATE_EXPORT MultiResolutionPyramidImageFilter:
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() ITK_OVERRIDE;
190 
195  virtual void GenerateOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
197 
204  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
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  // Begin concept checking
215  itkConceptMacro( SameDimensionCheck,
217  itkConceptMacro( OutputHasNumericTraitsCheck,
219  // End concept checking
220 #endif
221 
222 protected:
225  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
226 
228  void GenerateData() ITK_OVERRIDE;
229 
230  double m_MaximumError;
231 
232  unsigned int m_NumberOfLevels;
233  ScheduleType m_Schedule;
234 
235  bool m_UseShrinkImageFilter;
236 
237 private:
238  ITK_DISALLOW_COPY_AND_ASSIGN(MultiResolutionPyramidImageFilter);
239 };
240 } // namespace itk
241 
242 #ifndef ITK_MANUAL_INSTANTIATION
243 #include "itkMultiResolutionPyramidImageFilter.hxx"
244 #endif
245 
246 #endif
Base class for all process objects that output image data.
Framework for creating images in a multi-resolution pyramid.
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
ImageToImageFilter< TInputImage, TOutputImage > Superclass
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.