OTB  6.7.0
Orfeo Toolbox
otbDEMCaracteristicsExtractor.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1999-2011 Insight Software Consortium
3  * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
4  *
5  * This file is part of Orfeo Toolbox
6  *
7  * https://www.orfeo-toolbox.org/
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21 
22 #ifndef otbDEMCaracteristicsExtractor_h
23 #define otbDEMCaracteristicsExtractor_h
24 
25 #include "otbImage.h"
26 #include "otbVectorImage.h"
30 #include "itkAtan2ImageFilter.h"
31 #include "itkAtanImageFilter.h"
33 #include "itkMultiplyImageFilter.h"
34 #include "itkAcosImageFilter.h"
35 #include "itkCosImageFilter.h"
36 #include "itkSinImageFilter.h"
38 #include "itkAddImageFilter.h"
39 
40 #include "itkGradientImageFilter.h"
41 
42 namespace otb
43 {
44 
56 template <class TInputImage, class TOutputImage>
57 class ITK_EXPORT DEMCaracteristicsExtractor :
58  public itk::ImageToImageFilter<TInputImage, TOutputImage>
59 {
60 public:
62  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
63  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
65 
67  typedef TInputImage InputImageType;
68  typedef TOutputImage OutputImageType;
69 
75 
77  itkNewMacro(Self);
78 
80  itkTypeMacro(DEMCaracteristicsExtractor, ImageToImageFilter);
81 
83  typedef typename InputImageType::PixelType InputPixelType;
84  typedef typename InputImageType::InternalPixelType InputInternalPixelType;
85  typedef typename OutputImageType::PixelType OutputPixelType;
86  typedef typename OutputImageType::InternalPixelType OutputInternalPixelType;
89 
99 
108 
111  {
112  return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(0));
113  }
114 
117  {
118  return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(1));
119  }
120 
123  {
124  return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(2));
125  }
126 
129  {
130  return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(3));
131  }
132 
136  itkSetMacro(SolarAngle, double);
137  itkGetConstMacro(SolarAngle, double);
138 
140  itkSetMacro(SolarAzimut, double);
141  itkGetConstMacro(SolarAzimut, double);
142 
144  itkSetMacro(ViewAngle, double);
145  itkGetConstMacro(ViewAngle, double);
146 
148  itkSetMacro(ViewAzimut, double);
149  itkGetConstMacro(ViewAzimut, double);
151 
152 protected:
154  ~DEMCaracteristicsExtractor() override;
156  void PrintSelf(std::ostream& os, itk::Indent indent) const override;
157 
158  void GenerateData() override;
159 
160 private:
164  double m_SolarAngle;
165 
168 
170  double m_ViewAngle;
171 
173  double m_ViewAzimut;
174 };
175 
176 } // end namespace otb
177 
178 #ifndef OTB_MANUAL_INSTANTIATION
180 #endif
181 
182 #endif
OutputImageType::InternalPixelType OutputInternalPixelType
itk::GradientImageFilter< InputImageType, InputInternalPixelType, InputInternalPixelType > GradientRecursiveGaussianImageFilterType
itk::AcosImageFilter< OutputImageType, OutputImageType > AcosImageFilterType
itk::GradientMagnitudeImageFilter< InputImageType, OutputImageType > GradientMagnitudeFilterType
itk::NthElementImageAdaptor< tutuType, InputInternalPixelType > AdaptorType
TOutputImageType OutputImageType
itk::Atan2ImageFilter< AdaptorType, AdaptorType, OutputImageType > Atan2FilterType
GradientRecursiveGaussianImageFilterType::OutputImageType tutuType
MultiplyByScalarImageFilter< OutputImageType, OutputImageType > MultiplyByScalarImageFilterType
itk::CosImageFilter< OutputImageType, OutputImageType > CosImageFilterType
Calculates the slope, the orientation incidence and exitance radius values for each pixel...
itk::SmartPointer< const Self > ConstPointer
Creation of an "otb" image which contains metadata.
Definition: otbImage.h:89
TInputImage InputImageType
itk::ShiftScaleImageFilter< OutputImageType, OutputImageType > ShiftScaleImageFilterType
itk::AtanImageFilter< OutputImageType, OutputImageType > AtanFilterType
itk::ImageToImageFilter< TInputImage, OutputImageType > Superclass
itk::AddImageFilter< OutputImageType, OutputImageType, OutputImageType > AddImageFilterType
TOutputImage OutputImageType
itk::CovariantVector< InputInternalPixelType, 2 > VectorPixelType
itk::MultiplyImageFilter< OutputImageType, OutputImageType, OutputImageType > MultiplyImageFilterType
Image< VectorPixelType, 2 > VectorGradientImageType
InputImageType::InternalPixelType InputInternalPixelType
itk::SinImageFilter< OutputImageType, OutputImageType > SinImageFilterType
DataObject * GetOutput(const DataObjectIdentifierType &key)