OTB  9.0.0
Orfeo Toolbox
otbAngularProjectionImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2022 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;
68  typedef typename InputImageType::SizeType InputSizeType;
69  typedef typename InputImageType::IndexType InputIndexType;
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 
109 
110 }; // end of class
111 
112 } // end of namespace otb
113 
114 #ifndef OTB_MANUAL_INSTANTIATION
116 #endif
117 
118 
119 #endif
otb::AngularProjectionImageFilter
Performs spherical transformation in ND space.
Definition: otbAngularProjectionImageFilter.h:43
otb::AngularProjectionImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbAngularProjectionImageFilter.h:73
otb::AngularProjectionImageFilter::AngleArrayType
TAngleArray AngleArrayType
Definition: otbAngularProjectionImageFilter.h:78
otb::AngularProjectionImageFilter::InputIndexType
InputImageType::IndexType InputIndexType
Definition: otbAngularProjectionImageFilter.h:69
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::AngularProjectionImageFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbAngularProjectionImageFilter.h:75
otb::AngularProjectionImageFilter::AngleValueType
AngleArrayType::ValueType AngleValueType
Definition: otbAngularProjectionImageFilter.h:79
otb::AngularProjectionImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbAngularProjectionImageFilter.h:72
otb::AngularProjectionImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbAngularProjectionImageFilter.h:74
otb::AngularProjectionImageFilter::ImageRegionConstIteratorVectorType
std::vector< ImageRegionConstIteratorType > ImageRegionConstIteratorVectorType
Definition: otbAngularProjectionImageFilter.h:82
otb::AngularProjectionImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbAngularProjectionImageFilter.h:70
otb::AngularProjectionImageFilter::InputImageType
TInputImage InputImageType
Definition: otbAngularProjectionImageFilter.h:65
otb::AngularProjectionImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbAngularProjectionImageFilter.h:49
otb::AngularProjectionImageFilter::~AngularProjectionImageFilter
~AngularProjectionImageFilter() override
Definition: otbAngularProjectionImageFilter.h:97
otbAngularProjectionImageFilter.hxx
otb::AngularProjectionImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbAngularProjectionImageFilter.h:67
otb::AngularProjectionImageFilter::Self
AngularProjectionImageFilter Self
Definition: otbAngularProjectionImageFilter.h:47
otb::AngularProjectionImageFilter::PrecisionType
TPrecision PrecisionType
Definition: otbAngularProjectionImageFilter.h:77
otb::AngularProjectionImageFilter::ImageRegionConstIteratorType
itk::ImageRegionConstIterator< InputImageType > ImageRegionConstIteratorType
Definition: otbAngularProjectionImageFilter.h:81
otb::AngularProjectionImageFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbAngularProjectionImageFilter.h:66
otb::AngularProjectionImageFilter::Superclass
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Definition: otbAngularProjectionImageFilter.h:48
otb::AngularProjectionImageFilter::m_AngleArray
AngleArrayType m_AngleArray
Definition: otbAngularProjectionImageFilter.h:108
otb::AngularProjectionImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbAngularProjectionImageFilter.h:50
otb::AngularProjectionImageFilter::InputSizeType
InputImageType::SizeType InputSizeType
Definition: otbAngularProjectionImageFilter.h:68