OTB  6.7.0
Orfeo Toolbox
otbAngularProjectionImageFilter.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 otbAngularProjectionImageFilter_h
22 #define otbAngularProjectionImageFilter_h
23 
25 #include "itkProgressReporter.h"
26 #include "itkImageToImageFilter.h"
27 
28 namespace otb {
41 template < class TInputImage, class TOutputImage, class TAngleArray, class TPrecision >
43  : public itk::ImageToImageFilter< TInputImage, TOutputImage >
44 {
45 public:
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 
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  void ThreadedGenerateData( const OutputImageRegionType & outputRegionForThread, itk::ThreadIdType threadID ) override;
100  virtual OutputImagePixelType InternalGenerateData ( const ImageRegionConstIteratorVectorType & ) const;
101 
102 private:
103  AngularProjectionImageFilter(const Self&); // not implemented
104  void operator=(const Self&); // not implemented
105 
107 
108 }; // end of class
109 
110 } // end of namespace otb
111 
112 #ifndef OTB_MANUAL_INSTANTIATION
114 #endif
115 
116 
117 #endif
118 
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
itk::ImageRegionConstIterator< InputImageType > ImageRegionConstIteratorType
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
TInputImage InputImageType
Performs spherical transformation in ND space.
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
unsigned int ThreadIdType
std::vector< ImageRegionConstIteratorType > ImageRegionConstIteratorVectorType
itk::SmartPointer< const Self > ConstPointer