/usr/include/ossim/point_cloud/ossimPointBlock.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 | //**************************************************************************************************
//
// OSSIM (http://trac.osgeo.org/ossim/)
//
// License: MIT -- See LICENSE.txt file in the top level directory for more details.
//
//**************************************************************************************************
#ifndef ossimPointBlock_HEADER
#define ossimPointBlock_HEADER 1
#include <ossim/base/ossimConstants.h>
#include <ossim/base/ossimCommon.h> /* for ossim::isnan */
#include <ossim/base/ossimDataObject.h>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/base/ossimGrect.h>
#include <ossim/point_cloud/ossimPointRecord.h>
#include <vector>
class ossimSource;
/***************************************************************************************************
* Base class for all Point Cloud data sources, including input file handlers and processing nodes.
**************************************************************************************************/
class OSSIMDLLEXPORT ossimPointBlock: public ossimDataObject
{
public:
typedef std::vector< ossimRefPtr<ossimPointRecord> > PointList;
ossimPointBlock(ossimSource* owner=0, ossim_uint32 fields=0);
virtual ~ossimPointBlock();
/** Returns allocated size. The pointList may contain only null points if not assigned */
virtual ossim_uint32 size() const { return (ossim_uint32)m_pointList.size(); }
bool empty() const { return (size() == 0); }
/**
* Returns OR'd mash-up of ossimPointRecord field codes being stored (or desired to be stored)
*/
ossim_uint32 getFieldCode() const;
vector<ossimPointRecord::FIELD_CODES> getFieldCodesAsList() const;
/**
* Initializes the desired fields to be stored. This will affect future getBlock() calls. If
* the point list contains points from prior read, they will be deleted unless the points field
* code matches the code argument.
*/
void setFieldCode(ossim_uint32 code);
/** Adds single point to the tail of the list. */
virtual void addPoint(ossimPointRecord* point);
virtual const ossimPointRecord* getPoint(ossim_uint32 point_offset) const;
virtual ossimPointRecord* getPoint(ossim_uint32 point_offset);
const ossimPointRecord* operator[](ossim_uint32 i) const { return getPoint(i); }
ossimPointRecord* operator[](ossim_uint32 i) { return getPoint(i); }
virtual const PointList& getPoints() const { return m_pointList; }
virtual PointList& getPoints() { return m_pointList; }
void getFieldMin(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const;
void getFieldMax(ossimPointRecord::FIELD_CODES field, ossim_float32& value) const;
void getBounds(ossimGrect& block_bounds) const;
virtual const ossimPointBlock& operator=(const ossimPointBlock &rhs);
virtual ossimObject* dup() const;
/** Resets any storage to empty. */
virtual void clear() { m_pointList.clear(); m_isNormalized = false; m_minMaxValid = false;}
/**
* Fulfills base class pure virtual. TODO: Needs to be correctly implemented
*/
virtual bool isEqualTo(const ossimDataObject& /*rhs*/, bool /*deep_copy*/) const { return false; }
virtual ossim_uint32 getHashId() const { return 0; }
virtual ossim_uint32 getDataSizeInBytes() const { return 0; };
virtual void initialize() {};
protected:
ossimPointBlock(const ossimPointBlock& rhs);
void scanForMinMax() const;
ossimPointRecord m_nullPCR;
mutable ossimPointRecord m_minRecord;
mutable ossimPointRecord m_maxRecord;
mutable bool m_minMaxValid;
PointList m_pointList;
mutable ossim_uint32 m_fieldCode; // OR'd mash-up of ossimPointRecord::FIELD_CODES
bool m_isNormalized;
TYPE_DATA
};
#endif /* #ifndef ossimPointBlock_HEADER */
|