OTB  7.1.0
Orfeo Toolbox
otbImageToModulusAndDirectionImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
3  *
4  * This file is part of Orfeo Toolbox
5  *
6  * https://www.orfeo-toolbox.org/
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 
21 #ifndef otbImageToModulusAndDirectionImageFilter_h
22 #define otbImageToModulusAndDirectionImageFilter_h
23 
24 #include "itkImageToImageFilter.h"
25 
26 namespace otb
27 {
28 
41 template <class TInputImage, class TOutputImage, class TOutputImageDirection = TOutputImage>
42 class ITK_EXPORT ImageToModulusAndDirectionImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
43 {
44 public:
46  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
47  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
49 
52  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
53  typedef itk::SmartPointer<Self> Pointer;
54  typedef itk::SmartPointer<const Self> ConstPointer;
55 
57  itkNewMacro(Self);
58 
60  itkTypeMacro(ImageToModulusAndDirectionImageFilter, itk::ImageToImageFilter);
61 
62  typedef typename Superclass::InputImageType InputImageType;
63  typedef typename Superclass::OutputImageType OutputImageType;
64  typedef TOutputImageDirection OutputImageDirectionType;
65 
66  typedef typename InputImageType::Pointer InputImagePointer;
67  typedef typename InputImageType::ConstPointer InputImageConstPointer;
68  typedef typename InputImageType::RegionType InputImageRegionType;
69  typedef typename OutputImageType::Pointer OutputImagePointer;
70  typedef typename OutputImageType::ConstPointer OutputImageConstPointer;
71  typedef typename OutputImageType::RegionType OutputImageRegionType;
72 
74  const OutputImageType* GetOutput() const;
75 
77  OutputImageType* GetOutput();
78 
80  const OutputImageDirectionType* GetOutputDirection() const;
81 
83  OutputImageDirectionType* GetOutputDirection();
84 
85  void GenerateInputRequestedRegion() override;
86 
87 protected:
90  {
91  }
92  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
93 
94 private:
95  ImageToModulusAndDirectionImageFilter(const Self&) = delete;
96  void operator=(const Self&) = delete;
97 };
98 } // end namespace otb
99 
100 #ifndef OTB_MANUAL_INSTANTIATION
102 #endif
103 
104 #endif
Base class for modulus and direction image filters.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass