Skip to topic | Skip to bottom
Home
TModeling
TModeling.SP_APIr1.1 - 31 Dec 2008 - 03:54 - Main.guesttopic end

Start of topic | Skip to actions
The Streaming Point API ( SP_API ) contains all the files/functions/modules for working with data stored as Point Clouds.

The Streaming Point Library consists of 'streaming mesh' readers, Writers, and utilities

Overview

SP Readers represent the concept of extracting points and finalization tags from an input stream (or file).

SP Writers represent the concept of writing points and finalization tags to an output stream (or file).

All readers / writers are derived from the same base class which supports the concepts

Readers / Writers can be ...

Non-streaming

  • which implies the entire stream (file) must be in memory before you can safely process any element (point)

Streaming

  • Only a small portion of the file needs to be in memory before you start processing elements
  • Streaming is made easier by the concept of finalization
    • Finalization tags allows us to know when we are done with all points in a spatial sub-region
    • IE we have seen all points in this region
    • Once a region is finalized, we can make smart decisions about when to process points and reclaiming memory
  • Processing becomes
    • Read in points and finalization tags from the stream
    • When a region becomes finalized, process the points in that region, write them out, and reclaim their memory

Fields

  • A current count of points seen so far
  • A total count of points expected to be in the file
  • Optionally, a bounding box, around all the points in the stream
  • A current vertex position, the point just read from the stream
    • 3 floats, 3 doubles, or 3 integers reperesenting the current position
    • the current index uniquely identifies this point (used by the triangle events)
  • A current finalization tag just read from the stream
    • An index which indicates a specific region which has become finalized
  • Info specific to that file format

Operations

  • Open Stream
    • Note: usually the underlying file is opened outside of the reader and the file handle is passed in
  • Close Stream
  • Read Header, read any header information unique to this file format from the stream
  • Write Header, write any header info unique to this file format to the stream
  • Compute Bounds, compute min/max bounds for the entire stream (requires a pass thru the entire file)
  • Read Event
    • SP_POINT, read in a vertex from the stream
    • SP_FINALIZE_CELL, returns the index of the region which has become finalized
    • SP_EOF, we have reached the end of the stream
  • Write Point, write a point to the stream
  • Write Cell, write a finalization tag for a region to the stream

Readers

  • spreader - base reader class
  • spreader_asc - reader for ESRI ASCII file format (Streaming)
  • spreader_las - reader for LAS (?) file format
  • spreader_node - reader for ???
  • spreader_ply - reader for Stanford's PLY file format
  • spreader_raw_d - reader for raw binary file of positions as doubles
  • spreader_raw_f - reader for raw binary file of positions as floats
  • spreader_spa - reader for our Streaming Point ASCII format (Streaming)
  • spreader_spb - reader for our Streaming Point Binary format (Streaming)
  • spreader_spq - experimental format
  • spreader_txt - reader for ASCII text file, used with a parse string to extract values
  • spreader_upc - reader for UPC file format

Writers

  • spwriter - base writer class
  • spwriter_las - writer for LAS (?) file format
  • spwriter_nil - DO NOTHING writer, stub
  • spwriter_node - ???
  • spwriter_ply - writer for Stanford's Triangle Format (PLY) (Non-Streaming)
  • spwriter_raw_d - writer for raw binary file of positions as doubles
  • spwriter_raw_f - writer for raw binary file of positions as floats
  • spwriter_spa - writer for our Streaming Point ASCII format (Streaming)
  • spwriter_spb - writer for our Streaming Point Binary format (Streaming)
  • spwriter_spq - experimental format
  • spwriter_txt - writer for ASCII text file, ???

Utilities

  • spreadopener.h - Wrapper around other readers for easier use in tools & apps
  • spreadastiling.h - Tiles file repeatedly into a larger 2D or 3D grid (useful for generating large datasets for testing)

  • spwriteopener.h - Wrapper around other writers for easier use in tools & apps

-- ShawnDB - 01 Jun 2008
to top


You are here: TModeling > Software > TMVAPIs > SP_API

to top

Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback