OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimGenericPointCloudHandler.cpp
Go to the documentation of this file.
2 
4 {
5  // Fill the point storage in any order.
6  // Loop to add your points (assume your points are passed in a vector ecef_points[])
7  for (ossim_uint32 i=0; i<ecef_points.size(); ++i)
8  {
9  ossimPointRecord* point = new ossimPointRecord(ossimGpt(ecef_points[i]));
10  m_pointBlock.addPoint(point);
11  }
12  ossimGrect bounds;
13  m_pointBlock.getBounds(bounds);
14  m_minRecord = new ossimPointRecord(bounds.ll());
15  m_maxRecord = new ossimPointRecord(bounds.ur());
16 }
17 
19 {
20  // Fill the point storage in any order.
21  // Loop to add your points (assume your points are passed in a vector ecef_points[])
22  for (ossim_uint32 i=0; i<ground_points.size(); ++i)
23  {
24  ossimPointRecord* point = new ossimPointRecord(ground_points[i]);
25  m_pointBlock.addPoint(point);
26  }
27  ossimGrect bounds;
28  m_pointBlock.getBounds(bounds);
29  m_minRecord = new ossimPointRecord(bounds.ll());
30  m_maxRecord = new ossimPointRecord(bounds.ur());
31 }
32 
34 {
36 }
37 
39 {
40  return m_pointBlock.size();
41 }
42 
44  ossimPointBlock& block,
45  ossim_uint32 /* maxNumPoints */) const
46 {
47  block.clear();
48  if (offset >= m_pointBlock.size())
49  return;
50 
51  for (ossim_uint32 i=offset; i<m_pointBlock.size(); ++i)
52  block.addPoint(new ossimPointRecord(*(m_pointBlock[i])));
53 
54  m_currentPID = block.size();
55 }
56 
58 {
59  return 0;
60 }
61 
63 {
64  return false;
65 }
66 
68 {
69 }
ossimRefPtr< ossimPointRecord > m_maxRecord
virtual ossim_uint32 getFieldCode() const
Fetches the data fields ids available from this source, OR&#39;d together for testing against specific fi...
virtual bool open(const ossimFilename &pointsFile)
Method to open input point cloud dataset.
virtual void getFileBlock(ossim_uint32 offset, ossimPointBlock &block, ossim_uint32 maxNumPoints=0xFFFFFFFF) const
Fetches up to maxNumPoints points starting at the dataset&#39;s <offset> in the order they appear in the ...
void getBounds(ossimGrect &block_bounds) const
virtual void clear()
Resets any storage to empty.
virtual void addPoint(ossimPointRecord *point)
Adds single point to the tail of the list.
unsigned int ossim_uint32
ossimGpt ur() const
Definition: ossimGrect.h:257
virtual ossim_uint32 size() const
Returns allocated size.
virtual void close()
Closes the point cloud file(s).
ossimRefPtr< ossimPointRecord > m_minRecord
ossimGpt ll() const
Definition: ossimGrect.h:263
virtual ossim_uint32 getNumPoints() const
Returns the total number of points in the dataset (not just the block returned in getPoints) ...