OTB  7.2.0
Orfeo Toolbox
otbAngularProjectionImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2020 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 otbAngularProjectionImageFilter_h
22 #define otbAngularProjectionImageFilter_h
23 
24 #include "itkImageRegionConstIterator.h"
25 #include "itkProgressReporter.h"
26 #include "itkImageToImageFilter.h"
27 
28 namespace otb
29 {
42 template <class TInputImage, class TOutputImage, class TAngleArray, class TPrecision>
43 class ITK_EXPORT AngularProjectionImageFilter : public itk::ImageToImageFilter<TInputImage, TOutputImage>
44 {
45 public:
48  typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
49  typedef itk::SmartPointer<Self> Pointer;
50  typedef itk::SmartPointer<const Self> ConstPointer;
51 
53  itkNewMacro(Self);
54 
56  itkTypeMacro(AngularProjectionImageFilter, ImageToImageFilter);
57 
59  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
60  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
61  // itkStaticConstMacro(NumberOfInputImages, unsigned int, TAngleArray::Dimension+1);
63 
65  typedef TInputImage InputImageType;
66  typedef typename InputImageType::Pointer InputImagePointerType;
67  typedef typename InputImageType::RegionType InputImageRegionType;
70  typedef typename InputImageType::PixelType InputPixelType;
71 
72  typedef TOutputImage OutputImageType;
73  typedef typename OutputImageType::PixelType OutputImagePixelType;
74  typedef typename OutputImageType::RegionType OutputImageRegionType;
75  typedef typename OutputImageType::Pointer OutputImagePointerType;
76 
77  typedef TPrecision PrecisionType;
78  typedef TAngleArray AngleArrayType;
79  typedef typename AngleArrayType::ValueType AngleValueType;
80 
81  typedef itk::ImageRegionConstIterator<InputImageType> ImageRegionConstIteratorType;
82  typedef std::vector<ImageRegionConstIteratorType> ImageRegionConstIteratorVectorType;
83 
85  itkGetMacro(AngleArray, AngleArrayType);
86  itkSetMacro(AngleArray, AngleArrayType);
88 
89  void SetInput(unsigned int i, const InputImageType*) override;
90  using Superclass::SetInput;
91 
92  const InputImageType* GetInput(unsigned int i) const;
93 
94 
95 protected:
98  {
99  }
100 
101  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, itk::ThreadIdType threadID) override;
102  virtual OutputImagePixelType InternalGenerateData(const ImageRegionConstIteratorVectorType&) const;
103 
104 private:
105  AngularProjectionImageFilter(const Self&); // not implemented
106  void operator=(const Self&); // not implemented
107 
108  AngleArrayType m_AngleArray;
109 
110 }; // end of class
111 
112 } // end of namespace otb
113 
114 #ifndef OTB_MANUAL_INSTANTIATION
116 #endif
117 
118 
119 #endif
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
itk::ImageRegionConstIterator< InputImageType > ImageRegionConstIteratorType
Performs spherical transformation in ND space.
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
std::vector< ImageRegionConstIteratorType > ImageRegionConstIteratorVectorType
itk::SmartPointer< const Self > ConstPointer