laserlib::io Class Reference

Main class for handling laser scanned data. More...

Inheritance diagram for laserlib::io:

laserlib::bin laserlib::FileXYZ laserlib::las laserlib::walz

List of all members.

Public Member Functions

 io ()
virtual ~io ()
 Dtor.
virtual bool InitRead (std::string const &filename, ParametersWalz &param)=0
 Read points from file.
virtual bool Read (bool &bEOF)=0
 Read points from file.
virtual bool Compress ()=0
 Compress.
virtual bool Uncompress ()=0
 Uncompress.
virtual bool InitWrite (std::string const &filename, ParametersWalz &param)=0
 Write the current data to file.
virtual bool Write ()=0
virtual Vec_DP & GetX ()
 Return X vector.
virtual Vec_DP & GetY ()
 Return Y vector.
virtual Vec_DP & GetZ ()
 Return Z vector.
virtual void SetContainer (Container &container)
ContainerGetContainer ()
void SetLog2ChunkSize (int const &log2Chunks)
 log2( N ) where N is desired chunk size. Minimum 4 -> N==16
int GetChunkSize () const
 Number of points in a chunk.
ParametersWalzGetParameters ()
void SetFilename (std::string const &filename)
 Set file name.
void GetInterval (int level, unsigned int &nStart, unsigned int &nEnd)
 Get interval where a wavelet level resides.
virtual bool GetPoints (BoundingBox const &bb, Container &aContainer)
 Get the points that fall inside a rectangle.
virtual bool GetOverview (int const &level, Container &aContainer)
 Get a lower resolution overview.

Static Public Member Functions

static ioCreate (EFileType type)
 Creates an input/output object.
static ioCreate (std::string const &filename)
static ioCreateIOWalz (int const &log2Chunks, double const &truncateThreshold, int const &overviewFactor)
 Create a WALZ input/output object.
static EFileType GetFileType (std::string const &filename)
 Returns filetype of given file.
static int Log2ToCount (int const &iLog2)
 Returns 2 to the power of argument.
static int Round (double val)
 Round off floating point value to closest integer.

Protected Member Functions

bool _GetPointsInside (BoundingBox const &bb, std::list< Point3D > &pointList)
bool _CopyPointsToContainer (std::list< Point3D > &pointList, Container &aContainer)
bool _CopyContainerToPointList (Container &aContainer, std::list< Point3D > &pointList)

Protected Attributes

Container cContainer
 Container with data.
ParametersWalz cParameters
 Parameters to be applied.
FILE * cpFile
 The file to read or write.
bool cbCompressed
 Flag to keep track if data have been compressed already.
std::string cFilename
 The file name.


Detailed Description

Main class for handling laser scanned data.

The class is abstract and requires an implementation, such as laserlib::walz.


Constructor & Destructor Documentation

io::io (  ) 

io::~io (  )  [virtual]

Dtor.


Member Function Documentation

io * io::Create ( EFileType  type  )  [static]

Creates an input/output object.

Parameters:
type Type of input/output object

io * io::Create ( std::string const &  filename  )  [static]

Parameters:
filename Will give the extension so the right EFileType can be used for creation
See also:
Create( EFileType )

io * io::CreateIOWalz ( int const &  log2Chunks,
double const &  truncateThreshold,
int const &  overviewFactor 
) [static]

Create a WALZ input/output object.

Parameters:
log2Chunks log2(N) where N is the number of desired point to be kept as one unit
truncateThreshold Wavelet coefficients below this value will be truncated when compressing. Already a vlue of 0.3 seems to compress a lot.
overviewFactor Only N/overviewFactor points will be saved when compressing, using the top levels of the wavelet vectors. Must be multiple of 2.

virtual bool laserlib::io::InitRead ( std::string const &  filename,
ParametersWalz param 
) [pure virtual]

Read points from file.

  • Opens a file pointer to the file
  • reads first point as origin
    See also:
    Read

Implemented in laserlib::walz, and laserlib::FileXYZ.

virtual bool laserlib::io::Read ( bool &  bEOF  )  [pure virtual]

Read points from file.

Reads a chunk of data.

Parameters:
bEOF True if end of file is reached

Implemented in laserlib::walz, and laserlib::FileXYZ.

virtual bool laserlib::io::Compress (  )  [pure virtual]

Compress.

Implemented in laserlib::walz, and laserlib::FileXYZ.

virtual bool laserlib::io::Uncompress (  )  [pure virtual]

Uncompress.

Implemented in laserlib::walz, and laserlib::FileXYZ.

virtual bool laserlib::io::InitWrite ( std::string const &  filename,
ParametersWalz param 
) [pure virtual]

Write the current data to file.

Opens a file pointer

Implemented in laserlib::walz, and laserlib::FileXYZ.

virtual bool laserlib::io::Write (  )  [pure virtual]

Implemented in laserlib::walz, and laserlib::FileXYZ.

Vec_DP & io::GetX (  )  [virtual]

Return X vector.

Todo:
Should not be based on Numerical Recipes

Vec_DP & io::GetY (  )  [virtual]

Return Y vector.

Todo:
Should not be based on Numerical Recipes

Vec_DP & io::GetZ (  )  [virtual]

Return Z vector.

Todo:
Should not be based on Numerical Recipes

EFileType io::GetFileType ( std::string const &  filename  )  [static]

Returns filetype of given file.

void io::SetContainer ( Container container  )  [virtual]

Container & io::GetContainer (  ) 

void io::SetLog2ChunkSize ( int const &  log2Chunks  ) 

log2( N ) where N is desired chunk size. Minimum 4 -> N==16

See also:
GetChunkSize

int io::GetChunkSize (  )  const

Number of points in a chunk.

See also:
SetLog2ChunkSize

ParametersWalz& laserlib::io::GetParameters (  )  [inline]

int io::Log2ToCount ( int const &  iLog2  )  [static]

Returns 2 to the power of argument.

Parameters:
iLog2 power of two
Returns:
pow( 2, iLog2 ) as integer

void io::SetFilename ( std::string const &  filename  ) 

Set file name.

int laserlib::io::Round ( double  val  )  [inline, static]

Round off floating point value to closest integer.

void io::GetInterval ( int  level,
unsigned int &  nStart,
unsigned int &  nEnd 
)

Get interval where a wavelet level resides.

Parameters:
level Wavelet level, level=1 last 50%, level=2 -> 25%, level=3, 12.5%
nStart Start index of level
nEnd End index of interval (always==2*nStart)

bool io::GetPoints ( BoundingBox const &  bb,
Container aContainer 
) [virtual]

Get the points that fall inside a rectangle.

Parameters:
bb Bounding box of area to get all points in
aContainer Container to fill with the points
Todo:
Not implemented

Reimplemented in laserlib::walz, and laserlib::FileXYZ.

bool io::GetOverview ( int const &  level,
Container aContainer 
) [virtual]

Get a lower resolution overview.

Parameters:
level Overview level
aContainer Will be filled with the overview
Todo:
Not implemented

Reimplemented in laserlib::walz.

bool io::_GetPointsInside ( BoundingBox const &  bb,
std::list< Point3D > &  pointList 
) [protected]

bool io::_CopyPointsToContainer ( std::list< Point3D > &  pointList,
Container aContainer 
) [protected]

bool io::_CopyContainerToPointList ( Container aContainer,
std::list< Point3D > &  pointList 
) [protected]


Member Data Documentation

Container with data.

Parameters to be applied.

FILE* laserlib::io::cpFile [protected]

The file to read or write.

bool laserlib::io::cbCompressed [protected]

Flag to keep track if data have been compressed already.

std::string laserlib::io::cFilename [protected]

The file name.


Generated on Fri Feb 20 22:49:52 2009 for WALZ WAvelet Lidar Zipper by  doxygen 1.5.6