This file is indexed.

/usr/include/ossim/util/ossimHlzTool.h is in libossim-dev 2.2.2-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
//**************************************************************************************************
//
//     OSSIM Open Source Geospatial Data Processing Library
//     See top level LICENSE.txt file for license information
//
//**************************************************************************************************

#ifndef ossimHLZUtil_HEADER
#define ossimHLZUtil_HEADER

#include <ossim/base/ossimRefPtr.h>
#include <ossim/base/ossimProcessInterface.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/base/ossimIpt.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimGrect.h>
#include <ossim/base/ossimLeastSquaresPlane.h>
#include <ossim/imaging/ossimImageSource.h>
#include <ossim/imaging/ossimImageGeometry.h>
#include <ossim/imaging/ossimImageData.h>
#include <ossim/imaging/ossimImageHandler.h>
#include <ossim/imaging/ossimMemoryImageSource.h>
#include <ossim/projection/ossimImageViewProjectionTransform.h>
#include <ossim/parallel/ossimJob.h>
#include <ossim/parallel/ossimJobMultiThreadQueue.h>
#include <ossim/point_cloud/ossimPointCloudHandler.h>
#include <ossim/util/ossimChipProcTool.h>
#include <vector>

#include <mutex>
/*!
 *  Class for finding helicopter landing zones (HLZ) on a DEM given the final destination and max
 *  range from destination.
 */
class OSSIMDLLEXPORT ossimHlzTool : public ossimChipProcTool
{
public:
   ossimHlzTool();
   ~ossimHlzTool();

   virtual void setUsage(ossimArgumentParser& ap);
   virtual bool initialize(ossimArgumentParser& ap);
   virtual void initialize(const ossimKeywordlist& kwl);
   virtual bool execute();
   virtual ossimRefPtr<ossimImageData> getChip(const ossimIrect& img_rect);

   virtual ossimString getClassName() const { return "ossimHlzUtil"; }

   /** Used by ossimUtilityFactory */
   static const char* DESCRIPTION;

protected:
   class MaskSource
   {
   public:
      MaskSource(ossimHlzTool* hlzUtil, const ossimFilename& mask_image, bool exclude);
      ossimRefPtr<ossimSingleImageChain> image;
      bool exclude;
   };

   virtual void initProcessingChain();

   /** @brief Hidden from use copy constructor. */
   ossimHlzTool( const ossimHlzTool& obj );

   /** @brief Hidden from use assignment operator. */
   const ossimHlzTool& operator=( const ossimHlzTool& rhs );

   /** @brief Initializes arg parser and outputs usage. */
   void usage(ossimArgumentParser& ap);
   void addArguments(ossimArgumentParser& ap);
   void loadPcFiles(); // throws exception
   void loadMaskFiles(); // throws exception
   void writeSlopeImage();
   void setProductGSD(const double& meters_per_pixel);
   bool computeHLZ();

   double m_slopeThreshold; // (degrees)
   double m_roughnessThreshold; // peak deviation from plane (meters)
   double m_hlzMinRadius; // meters
   ossimFilename m_slopeFile; // optional byproduct output
   ossimIpt m_demFilterSize;
   ossimRefPtr<ossimImageData> m_demBuffer;
   ossimRefPtr<ossimImageData> m_outBuffer;
   ossimRefPtr<ossimMemoryImageSource> m_memSource;
   ossim_uint8 m_badLzValue;
   ossim_uint8 m_marginalLzValue;
   ossim_uint8 m_goodLzValue;
   bool m_useLsFitMethod;
   ossimRefPtr<ossimImageSource> m_combinedElevSource;
   std::vector< ossimRefPtr<ossimPointCloudHandler> > m_pcSources;
   std::vector<MaskSource> m_maskSources;

   // For debugging:
   ossim_uint32 m_numThreads;
   double d_accumT;

   class PatchProcessorJob : public ossimJob
   {
   public:
      PatchProcessorJob(ossimHlzTool* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0);

      virtual bool level1Test() = 0;
      bool level2Test();
      bool maskTest();

      ossimHlzTool* m_hlzUtil;
      ossimIpt m_demPatchUL;
      ossimIpt m_demPatchLR;
      ossim_uint8 m_status;
      float m_nullValue;

      // ossim_uint32 m_chipId; // for debug
      static std::mutex m_bufMutex;

   protected:
      virtual void run();

   };

   class LsFitPatchProcessorJob : public PatchProcessorJob
   {
   public:
      LsFitPatchProcessorJob(ossimHlzTool* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0)
         : PatchProcessorJob(hlzUtil, origin, chip_id),
           m_plane (new ossimLeastSquaresPlane) {}

      ~LsFitPatchProcessorJob() { delete m_plane; }
      virtual bool level1Test();
      ossimLeastSquaresPlane* m_plane;
   };

   class NormPatchProcessorJob : public PatchProcessorJob
   {
   public:
      NormPatchProcessorJob(ossimHlzTool* hlzUtil, const ossimIpt& origin, ossim_uint32 chip_id=0)
         : PatchProcessorJob(hlzUtil, origin, chip_id) {}

      virtual bool level1Test();
   };

};

#endif