This file is indexed.

/usr/include/OTB-6.4/otbDEMCaracteristicsExtractor.h is in libotb-dev 6.4.0+dfsg-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
/*
 * Copyright (C) 1999-2011 Insight Software Consortium
 * Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
 *
 * This file is part of Orfeo Toolbox
 *
 *     https://www.orfeo-toolbox.org/
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef otbDEMCaracteristicsExtractor_h
#define otbDEMCaracteristicsExtractor_h

#include "otbImage.h"
#include "otbVectorImage.h"
#include "itkUnaryFunctorImageFilter.h"
#include "itkGradientMagnitudeImageFilter.h"
#include "itkGradientRecursiveGaussianImageFilter.h"
#include "itkAtan2ImageFilter.h"
#include "itkAtanImageFilter.h"
#include "otbMultiplyByScalarImageFilter.h"
#include "itkMultiplyImageFilter.h"
#include "itkAcosImageFilter.h"
#include "itkCosImageFilter.h"
#include "itkSinImageFilter.h"
#include "itkShiftScaleImageFilter.h"
#include "itkAddImageFilter.h"

#include "itkGradientImageFilter.h"

namespace otb
{

/** \class DEMCaracteristicsExtractor
   *  \brief Calculates the slope, the orientation incidence and exitance radius values for each pixel.
   *
   * To note that azimuth value are projection over North-South direction and angles have to be given in degres.
   *
   * \ingroup DEMHanler
   * \ingroup DEMToImageGenerator
   * \ingroup Radiometry
 *
 * \ingroup OTBDEM
 */
template <class TInputImage, class TOutputImage>
class ITK_EXPORT DEMCaracteristicsExtractor :
  public itk::ImageToImageFilter<TInputImage, TOutputImage>
{
public:
  /** Extract input and output images dimensions.*/
  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
  itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);

  /** "typedef" to simplify the variables definition and the declaration. */
  typedef TInputImage  InputImageType;
  typedef TOutputImage OutputImageType;

  /** "typedef" for standard classes. */
  typedef DEMCaracteristicsExtractor                            Self;
  typedef itk::ImageToImageFilter<TInputImage, OutputImageType> Superclass;
  typedef itk::SmartPointer<Self>                               Pointer;
  typedef itk::SmartPointer<const Self>                         ConstPointer;

  /** object factory method. */
  itkNewMacro(Self);

  /** return class name. */
  itkTypeMacro(DEMCaracteristicsExtractor, ImageToImageFilter);

  /** Supported images definition. */
  typedef typename InputImageType::PixelType              InputPixelType;
  typedef typename InputImageType::InternalPixelType      InputInternalPixelType;
  typedef typename OutputImageType::PixelType             OutputPixelType;
  typedef typename OutputImageType::InternalPixelType     OutputInternalPixelType;
  typedef itk::CovariantVector<InputInternalPixelType, 2> VectorPixelType;
  typedef Image<VectorPixelType, 2>                       VectorGradientImageType;

  /** Filter definition */
  typedef itk::GradientMagnitudeImageFilter<InputImageType,
      OutputImageType>                 GradientMagnitudeFilterType;
  typedef itk::GradientImageFilter<InputImageType, InputInternalPixelType,
      InputInternalPixelType>                   GradientRecursiveGaussianImageFilterType;
  typedef typename GradientRecursiveGaussianImageFilterType::OutputImageType tutuType;
  typedef itk::NthElementImageAdaptor<tutuType, InputInternalPixelType>      AdaptorType;
  typedef itk::Atan2ImageFilter<AdaptorType, AdaptorType, OutputImageType>   Atan2FilterType;
  typedef itk::AtanImageFilter<OutputImageType, OutputImageType>             AtanFilterType;

  /** Operation Filters*/
  typedef MultiplyByScalarImageFilter<OutputImageType, OutputImageType>               MultiplyByScalarImageFilterType;
  typedef itk::MultiplyImageFilter<OutputImageType, OutputImageType, OutputImageType> MultiplyImageFilterType;
  typedef itk::AcosImageFilter<OutputImageType, OutputImageType>                      AcosImageFilterType;
  typedef itk::CosImageFilter<OutputImageType, OutputImageType>                       CosImageFilterType;
  typedef itk::SinImageFilter<OutputImageType, OutputImageType>                       SinImageFilterType;
  typedef itk::ShiftScaleImageFilter<OutputImageType, OutputImageType>                ShiftScaleImageFilterType;
  typedef itk::AddImageFilter<OutputImageType, OutputImageType, OutputImageType>      AddImageFilterType;

  /** Get the slop output image */
  OutputImageType* GetSlopOutput()
  {
    return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(0));
  }

  /** Get the aspect output image */
  OutputImageType* GetAspectOutput()
  {
    return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(1));
  }
  /** Get the incidence output image */
  OutputImageType* GetIncidenceOutput()
  {
    return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(2));
  }

  /** Get the exitance output image */
  OutputImageType* GetExitanceOutput()
  {
    return static_cast<OutputImageType*>(this->itk::ProcessObject::GetOutput(3));
  }

  /** Angle parameters*/
  /** Set/Get Solar Angle */
  itkSetMacro(SolarAngle, double);
  itkGetConstMacro(SolarAngle, double);
  /** Set/Get Solar Solar */
  itkSetMacro(SolarAzimut, double);
  itkGetConstMacro(SolarAzimut, double);
  /** Set/Get View Angle */
  itkSetMacro(ViewAngle, double);
  itkGetConstMacro(ViewAngle, double);
  /** Set/Get View Solar */
  itkSetMacro(ViewAzimut, double);
  itkGetConstMacro(ViewAzimut, double);

protected:
  DEMCaracteristicsExtractor();
  ~DEMCaracteristicsExtractor() ITK_OVERRIDE;
  /**PrintSelf method */
  void PrintSelf(std::ostream& os, itk::Indent indent) const ITK_OVERRIDE;

  void GenerateData() ITK_OVERRIDE;

private:
  /** Angle parameters*/
  /** Solar Angle */
  double m_SolarAngle;
  /** Solar Solar */
  double m_SolarAzimut;
  /** View Angle */
  double m_ViewAngle;
  /** View Solar */
  double m_ViewAzimut;
};

} // end namespace otb

#ifndef OTB_MANUAL_INSTANTIATION
#include "otbDEMCaracteristicsExtractor.txx"
#endif

#endif