OTB  6.7.0
Orfeo Toolbox
otbAngularProjectionSetImageFilter.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 otbAngularProjectionSetImageFilter_h
22 #define otbAngularProjectionSetImageFilter_h
23 
26 #include "otbObjectList.h"
27 
28 namespace otb {
47 template < class TInputImage, class TOutputImage, class TAngleList, class TPrecision >
49  : public ImageToImageListFilter< TInputImage, TOutputImage >
50 {
51 public:
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;
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 "
108  << idx << "; this element don't exist, the size of the filter list is "
109  << m_FilterList->Size() << ".");
110  }
111  return static_cast<FilterType*>(m_FilterList->GetNthElement(idx));
112  }
113 
116  return static_cast<AngleListType *>( this->m_AngleList );
117  }
118  void SetAngleList ( const AngleListType * angles ) {
119  this->m_AngleList = const_cast<AngleListType*>( angles );
120  this->Modified();
121  }
123 
124  void SetInput ( unsigned int i, const InputImageType * );
125  using Superclass::SetInput;
126 
127  const InputImageType * GetInput( unsigned int i ) const;
128 
129 protected:
132 
133  void GenerateData() override;
134 
135 private:
136  AngularProjectionSetImageFilter(const Self&); // not implemented
137  void operator=(const Self&); // not implemented
138 
141 
142 }; // end of class
143 
144 } // end of namespace otb
145 
146 #ifndef OTB_MANUAL_INSTANTIATION
148 #endif
149 
150 
151 #endif
152 
itk::Size< Monteverdi_DIMENSION > SizeType
Definition: mvdTypes.h:137
FilterType * GetNthFilter(unsigned int idx) const
Superclass::Iterator Iterator
Definition: otbImageList.h:58
AngularProjectionImageFilter< InputImageType, OutputImageType, AngleArrayType, PrecisionType > FilterType
ImageToImageListFilter< TInputImage, TOutputImage > Superclass
Iterator of the object list.
itk::Index< Monteverdi_DIMENSION > IndexType
Definition: mvdTypes.h:133
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >...
Definition: otbObjectList.h:40
Performs spherical transformation in ND space.
AngleListType::MeasurementVectorType MeasurementVectorType
Base class for all the filters taking an image input to produce an image list.
Performs spherical transformation in ND space from a set of angle values.