ITK  6.0.0
Insight Toolkit
itkMultiResolutionPyramidImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
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  * https://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 <typename TInputImage, typename TOutputImage>
109 class ITK_TEMPLATE_EXPORT MultiResolutionPyramidImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
110 {
111 public:
112  ITK_DISALLOW_COPY_AND_MOVE(MultiResolutionPyramidImageFilter);
113 
119 
121  itkNewMacro(Self);
122 
124  itkOverrideGetNameOfClassMacro(MultiResolutionPyramidImageFilter);
125 
128 
130  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
131  static constexpr unsigned int OutputImageDimension = TOutputImage::ImageDimension;
132 
134  using typename Superclass::InputImageType;
135  using typename Superclass::OutputImageType;
136  using typename Superclass::InputImagePointer;
137  using typename Superclass::OutputImagePointer;
138  using typename Superclass::InputImageConstPointer;
139 
146  virtual void
147  SetNumberOfLevels(unsigned int num);
148 
150  itkGetConstMacro(NumberOfLevels, unsigned int);
151 
158  virtual void
159  SetSchedule(const ScheduleType & schedule);
160 
162  itkGetConstReferenceMacro(Schedule, ScheduleType);
163 
168  virtual void
169  SetStartingShrinkFactors(unsigned int factor);
170 
171  virtual void
172  SetStartingShrinkFactors(const unsigned int * factors);
173 
175  const unsigned int *
176  GetStartingShrinkFactors() const;
177 
181  static bool
182  IsScheduleDownwardDivisible(const ScheduleType & schedule);
183 
190  void
191  GenerateOutputInformation() override;
192 
197  void
198  GenerateOutputRequestedRegion(DataObject * refOutput) override;
207  void
208  GenerateInputRequestedRegion() override;
209 
210  itkSetMacro(MaximumError, double);
211  itkGetConstReferenceMacro(MaximumError, double);
212 
213  itkSetMacro(UseShrinkImageFilter, bool);
214  itkGetConstMacro(UseShrinkImageFilter, bool);
215  itkBooleanMacro(UseShrinkImageFilter);
216 
217 #ifdef ITK_USE_CONCEPT_CHECKING
218  // Begin concept checking
221  // End concept checking
222 #endif
223 
224 protected:
226  ~MultiResolutionPyramidImageFilter() override = default;
227  void
228  PrintSelf(std::ostream & os, Indent indent) const override;
229 
231  void
232  GenerateData() override;
233 
234  double m_MaximumError{};
235 
236  unsigned int m_NumberOfLevels{};
237  ScheduleType m_Schedule{};
238 
239  bool m_UseShrinkImageFilter{};
240 };
241 } // namespace itk
242 
243 #ifndef ITK_MANUAL_INSTANTIATION
244 # include "itkMultiResolutionPyramidImageFilter.hxx"
245 #endif
246 
247 #endif
itk::Concept::HasNumericTraits
Definition: itkConceptChecking.h:716
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::Concept::SameDimension
Definition: itkConceptChecking.h:696
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itkImageToImageFilter.h
itkArray2D.h
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:65
itk::MultiResolutionPyramidImageFilter
Framework for creating images in a multi-resolution pyramid.
Definition: itkMultiResolutionPyramidImageFilter.h:109
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itk::Array2D< unsigned int >
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293