ITK  5.0.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:
116  ITK_DISALLOW_COPY_AND_ASSIGN(MultiResolutionPyramidImageFilter);
117 
123 
125  itkNewMacro(Self);
126 
129 
132 
134  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
135  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
136 
138  using InputImageType = typename Superclass::InputImageType;
139  using OutputImageType = typename Superclass::OutputImageType;
140  using InputImagePointer = typename Superclass::InputImagePointer;
141  using OutputImagePointer = typename Superclass::OutputImagePointer;
142  using InputImageConstPointer = typename Superclass::InputImageConstPointer;
143 
150  virtual void SetNumberOfLevels(unsigned int num);
151 
153  itkGetConstMacro(NumberOfLevels, unsigned int);
154 
161  virtual void SetSchedule(const ScheduleType & schedule);
162 
164  itkGetConstReferenceMacro(Schedule, ScheduleType);
165 
170  virtual void SetStartingShrinkFactors(unsigned int factor);
171 
172  virtual void SetStartingShrinkFactors(unsigned int *factors);
173 
175  const unsigned int * GetStartingShrinkFactors() const;
176 
180  static bool IsScheduleDownwardDivisible(const ScheduleType & schedule);
181 
188  void GenerateOutputInformation() override;
189 
194  void GenerateOutputRequestedRegion(DataObject *output) override;
196 
203  void GenerateInputRequestedRegion() override;
204 
205  itkSetMacro(MaximumError, double);
206  itkGetConstReferenceMacro(MaximumError, double);
207 
208  itkSetMacro(UseShrinkImageFilter, bool);
209  itkGetConstMacro(UseShrinkImageFilter, bool);
210  itkBooleanMacro(UseShrinkImageFilter);
211 
212 #ifdef ITK_USE_CONCEPT_CHECKING
213  // Begin concept checking
214  itkConceptMacro( SameDimensionCheck,
216  itkConceptMacro( OutputHasNumericTraitsCheck,
218  // End concept checking
219 #endif
220 
221 protected:
223  ~MultiResolutionPyramidImageFilter() override = default;
224  void PrintSelf(std::ostream & os, Indent indent) const override;
225 
227  void GenerateData() override;
228 
230 
231  unsigned int m_NumberOfLevels;
233 
235 };
236 } // namespace itk
237 
238 #ifndef ITK_MANUAL_INSTANTIATION
239 #include "itkMultiResolutionPyramidImageFilter.hxx"
240 #endif
241 
242 #endif
typename OutputImageType::Pointer OutputImagePointer
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Framework for creating images in a multi-resolution pyramid.
typename InputImageType::Pointer InputImagePointer
TOutputImage OutputImageType
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
#define itkConceptMacro(name, concept)
typename InputImageType::ConstPointer InputImageConstPointer
Base class for all data objects in ITK.