OTB  9.0.0
Orfeo Toolbox
otbAngularProjectionSetImageFilter.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 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 
102  itkGetObjectMacro(FilterList, FilterListType);
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
otb::AngularProjectionSetImageFilter::Superclass
ImageToImageListFilter< TInputImage, TOutputImage > Superclass
Definition: otbAngularProjectionSetImageFilter.h:54
otb::AngularProjectionSetImageFilter::GetNthFilter
FilterType * GetNthFilter(unsigned int idx) const
Definition: otbAngularProjectionSetImageFilter.h:103
otb::AngularProjectionImageFilter
Performs spherical transformation in ND space.
Definition: otbAngularProjectionImageFilter.h:43
otb::AngularProjectionSetImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbAngularProjectionSetImageFilter.h:55
otb::AngularProjectionSetImageFilter::InputImageRegionType
InputImageType::RegionType InputImageRegionType
Definition: otbAngularProjectionSetImageFilter.h:73
otb::AngularProjectionSetImageFilter::MeasurementType
AngleListType::MeasurementType MeasurementType
Definition: otbAngularProjectionSetImageFilter.h:92
otb::AngularProjectionSetImageFilter::Self
AngularProjectionSetImageFilter Self
Definition: otbAngularProjectionSetImageFilter.h:53
otbImageToImageListFilter.h
otb::AngularProjectionSetImageFilter::SetAngleList
void SetAngleList(const AngleListType *angles)
Definition: otbAngularProjectionSetImageFilter.h:118
otb::ImageListSource
Base class for all the filters producing an otbImageList.
Definition: otbImageListSource.h:40
otb::AngularProjectionSetImageFilter::AngleListPointerType
AngleListType::Pointer AngleListPointerType
Definition: otbAngularProjectionSetImageFilter.h:90
otb::AngularProjectionSetImageFilter::OutputImagePointerType
OutputImageType::Pointer OutputImagePointerType
Definition: otbAngularProjectionSetImageFilter.h:79
otb::AngularProjectionSetImageFilter::InputIndexType
InputImageType::IndexType InputIndexType
Definition: otbAngularProjectionSetImageFilter.h:75
otb::AngularProjectionSetImageFilter::ConstPointer
itk::SmartPointer< const Self > ConstPointer
Definition: otbAngularProjectionSetImageFilter.h:56
otb::AngularProjectionSetImageFilter::GetAngleList
AngleListType * GetAngleList() const
Definition: otbAngularProjectionSetImageFilter.h:114
otb
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.
Definition: otbJoinContainer.h:32
otb::AngularProjectionSetImageFilter
Performs spherical transformation in ND space from a set of angle values.
Definition: otbAngularProjectionSetImageFilter.h:49
otb::AngularProjectionSetImageFilter::OutputImageListPointerType
OutputImageListType::Pointer OutputImageListPointerType
Definition: otbAngularProjectionSetImageFilter.h:84
otb::ObjectList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbObjectList.h:46
otb::AngularProjectionSetImageFilter::InputImagePointerType
InputImageType::Pointer InputImagePointerType
Definition: otbAngularProjectionSetImageFilter.h:72
otb::AngularProjectionSetImageFilter::AngleArrayType
MeasurementVectorType AngleArrayType
Definition: otbAngularProjectionSetImageFilter.h:93
otbAngularProjectionSetImageFilter.hxx
otb::AngularProjectionSetImageFilter::~AngularProjectionSetImageFilter
~AngularProjectionSetImageFilter() override
Definition: otbAngularProjectionSetImageFilter.h:132
otb::AngularProjectionSetImageFilter::FilterListType
ObjectList< FilterType > FilterListType
Definition: otbAngularProjectionSetImageFilter.h:98
otb::AngularProjectionSetImageFilter::FilterListIterator
FilterListType::Iterator FilterListIterator
Definition: otbAngularProjectionSetImageFilter.h:100
otbAngularProjectionImageFilter.h
otb::AngularProjectionSetImageFilter::InputSizeType
InputImageType::SizeType InputSizeType
Definition: otbAngularProjectionSetImageFilter.h:74
otb::ImageList::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbImageList.h:45
otb::AngularProjectionSetImageFilter::OutputImageRegionType
OutputImageType::RegionType OutputImageRegionType
Definition: otbAngularProjectionSetImageFilter.h:81
otb::AngularProjectionImageFilter::Pointer
itk::SmartPointer< Self > Pointer
Definition: otbAngularProjectionImageFilter.h:49
otb::AngularProjectionSetImageFilter::m_FilterList
FilterListPointerType m_FilterList
Definition: otbAngularProjectionSetImageFilter.h:143
otb::AngularProjectionSetImageFilter::OutputImageListType
Superclass::OutputImageListType OutputImageListType
Definition: otbAngularProjectionSetImageFilter.h:83
otb::AngularProjectionSetImageFilter::PrecisionType
TPrecision PrecisionType
Definition: otbAngularProjectionSetImageFilter.h:87
otb::AngularProjectionSetImageFilter::FilterPointerType
FilterType::Pointer FilterPointerType
Definition: otbAngularProjectionSetImageFilter.h:97
otbObjectList.h
otb::AngularProjectionSetImageFilter::OutputImageType
TOutputImage OutputImageType
Definition: otbAngularProjectionSetImageFilter.h:78
otb::ObjectList::Iterator
Iterator of the object list.
Definition: otbObjectList.h:168
otb::AngularProjectionSetImageFilter::OutputImageIterator
OutputImageListType::Iterator OutputImageIterator
Definition: otbAngularProjectionSetImageFilter.h:85
otb::ImageList::Iterator
Superclass::Iterator Iterator
Definition: otbImageList.h:57
otb::AngularProjectionSetImageFilter::InputImageType
TInputImage InputImageType
Definition: otbAngularProjectionSetImageFilter.h:71
otb::AngularProjectionSetImageFilter::FilterListPointerType
FilterListType::Pointer FilterListPointerType
Definition: otbAngularProjectionSetImageFilter.h:99
otb::AngularProjectionSetImageFilter::InputPixelType
InputImageType::PixelType InputPixelType
Definition: otbAngularProjectionSetImageFilter.h:76
otb::AngularProjectionSetImageFilter::AngleValueType
MeasurementType AngleValueType
Definition: otbAngularProjectionSetImageFilter.h:94
otb::ObjectList
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
Definition: otbObjectList.h:40
otb::AngularProjectionSetImageFilter::MeasurementVectorType
AngleListType::MeasurementVectorType MeasurementVectorType
Definition: otbAngularProjectionSetImageFilter.h:91
otb::AngularProjectionSetImageFilter::FilterType
AngularProjectionImageFilter< InputImageType, OutputImageType, AngleArrayType, PrecisionType > FilterType
Definition: otbAngularProjectionSetImageFilter.h:96
otb::AngularProjectionSetImageFilter::AngleListType
TAngleList AngleListType
Definition: otbAngularProjectionSetImageFilter.h:89
otb::ImageToImageListFilter
Base class for all the filters taking an image input to produce an image list.
Definition: otbImageToImageListFilter.h:39
otb::AngularProjectionSetImageFilter::OutputImagePixelType
OutputImageType::PixelType OutputImagePixelType
Definition: otbAngularProjectionSetImageFilter.h:80
otb::AngularProjectionSetImageFilter::m_AngleList
AngleListPointerType m_AngleList
Definition: otbAngularProjectionSetImageFilter.h:142