
Public Member Functions | |
| io () | |
| virtual | ~io () |
| Dtor. | |
| virtual bool | InitRead (std::string const &filename, ParametersWalz ¶m)=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 ¶m)=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) |
| Container & | GetContainer () |
| 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. | |
| ParametersWalz & | GetParameters () |
| 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 io * | Create (EFileType type) |
| Creates an input/output object. | |
| static io * | Create (std::string const &filename) |
| static io * | CreateIOWalz (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. | |
The class is abstract and requires an implementation, such as laserlib::walz.
| io::io | ( | ) |
| io::~io | ( | ) | [virtual] |
Dtor.
Creates an input/output object.
| type | Type of input/output object |
| io * io::Create | ( | std::string const & | filename | ) | [static] |
| filename | Will give the extension so the right EFileType can be used for creation |
| io * io::CreateIOWalz | ( | int const & | log2Chunks, | |
| double const & | truncateThreshold, | |||
| int const & | overviewFactor | |||
| ) | [static] |
Create a WALZ input/output object.
| 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.
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.
| bEOF | True if end of file is reached |
Implemented in laserlib::walz, and laserlib::FileXYZ.
| virtual bool laserlib::io::Compress | ( | ) | [pure virtual] |
| virtual bool laserlib::io::Uncompress | ( | ) | [pure virtual] |
| 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] |
| Vec_DP & io::GetY | ( | ) | [virtual] |
| Vec_DP & io::GetZ | ( | ) | [virtual] |
| 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 | ) |
| int io::GetChunkSize | ( | ) | const |
| ParametersWalz& laserlib::io::GetParameters | ( | ) | [inline] |
| int io::Log2ToCount | ( | int const & | iLog2 | ) | [static] |
Returns 2 to the power of argument.
| iLog2 | power of two |
| 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.
| 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.
| bb | Bounding box of area to get all points in | |
| aContainer | Container to fill with the points |
Reimplemented in laserlib::walz, and laserlib::FileXYZ.
| bool io::GetOverview | ( | int const & | level, | |
| Container & | aContainer | |||
| ) | [virtual] |
Get a lower resolution overview.
| level | Overview level | |
| aContainer | Will be filled with the overview |
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] |
Container laserlib::io::cContainer [protected] |
Container with data.
ParametersWalz laserlib::io::cParameters [protected] |
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.
1.5.6