OTB  10.0.0
Orfeo Toolbox
otbAngularProjectionSetImageFilter.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2005-2024 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 otbAngularProjectionSetImageFilter_h
22 #define otbAngularProjectionSetImageFilter_h
23 
26 #include "otbObjectList.h"
27 
28 namespace otb
29 {
48 template <class TInputImage, class TOutputImage, class TAngleList, class TPrecision>
49 class ITK_EXPORT AngularProjectionSetImageFilter : public ImageToImageListFilter<TInputImage, TOutputImage>
50 {
51 public:
55  typedef itk::SmartPointer<Self> Pointer;
56  typedef itk::SmartPointer<const Self> ConstPointer;
57 
59  itkNewMacro(Self);
60 
63 
65  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
66  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
67  // itkStaticConstMacro(NumberOfInputImages, unsigned int, TAngleList::MeasurementVectorType::Dimension+1);
69 
71  typedef TInputImage InputImageType;
72  typedef typename InputImageType::Pointer InputImagePointerType;
73  typedef typename InputImageType::RegionType InputImageRegionType;
74  typedef typename InputImageType::SizeType InputSizeType;
75  typedef typename InputImageType::IndexType InputIndexType;
76  typedef typename InputImageType::PixelType InputPixelType;
77 
78  typedef TOutputImage OutputImageType;
79  typedef typename OutputImageType::Pointer OutputImagePointerType;
80  typedef typename OutputImageType::PixelType OutputImagePixelType;
81  typedef typename OutputImageType::RegionType OutputImageRegionType;
82 
83  typedef typename Superclass::OutputImageListType OutputImageListType;
86 
87  typedef TPrecision PrecisionType;
88 
89  typedef TAngleList AngleListType;
90  typedef typename AngleListType::Pointer AngleListPointerType;
91  typedef typename AngleListType::MeasurementVectorType MeasurementVectorType;
92  typedef typename AngleListType::MeasurementType MeasurementType;
95 
101 
103  FilterType* GetNthFilter(unsigned int idx) const
104  {
105  if (idx >= m_FilterList->Size())
106  {
107  itkExceptionMacro(<< "Impossible to GetNthFilter with the index element " << idx << "; this element don't exist, the size of the filter list is "
108  << m_FilterList->Size() << ".");
109  }
110  return static_cast<FilterType*>(m_FilterList->GetNthElement(idx));
111  }
112 
115  {
116  return static_cast<AngleListType*>(this->m_AngleList);
117  }
118  void SetAngleList(const AngleListType* angles)
119  {
120  this->m_AngleList = const_cast<AngleListType*>(angles);
121  this->Modified();
122  }
124 
125  void SetInput(unsigned int i, const InputImageType*);
126  using Superclass::SetInput;
127 
128  const InputImageType* GetInput(unsigned int i) const;
129 
130 protected:
133  {
134  }
135 
136  void GenerateData() override;
137 
138 private:
139  AngularProjectionSetImageFilter(const Self&); // not implemented
140  void operator=(const Self&); // not implemented
141 
144 
145 }; // end of class
146 
147 } // end of namespace otb
148 
149 #ifndef OTB_MANUAL_INSTANTIATION
151 #endif
152 
153 
154 #endif
Performs spherical transformation in ND space.
Performs spherical transformation in ND space from a set of angle values.
itkGetObjectMacro(FilterList, FilterListType)
AngleListType::MeasurementVectorType MeasurementVectorType
FilterType * GetNthFilter(unsigned int idx) const
AngularProjectionImageFilter< InputImageType, OutputImageType, AngleArrayType, PrecisionType > FilterType
ImageToImageListFilter< TInputImage, TOutputImage > Superclass
Base class for all the filters producing an otbImageList.
itk::SmartPointer< Self > Pointer
Definition: otbImageList.h:45
Superclass::Iterator Iterator
Definition: otbImageList.h:57
Base class for all the filters taking an image input to produce an image list.
Iterator of the object list.
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:41
itk::SmartPointer< Self > Pointer
Definition: otbObjectList.h:46
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.