BinaryIO Class Reference

#include <VisionX/libraries/VoxelGridCore/io/BinaryIO.h>

Static Public Member Functions

template<typename VoxelGridT>
static VoxelGridT read (const std::string &filename)
 Read a voxel grid from the filename.
 
template<typename VoxelGridT>
static VoxelGridT read (std::istream &is)
 Read a voxel grid from the in-stream.
 
template<typename VoxelT>
static void read (VoxelGrid< VoxelT > &voxelGrid, const std::string &filename)
 Read a voxel grid from the file.
 
template<typename VoxelT>
static void read (VoxelGrid< VoxelT > &voxelGrid, std::istream &is)
 Read a voxel grid from the in-stream.
 
template<typename VoxelT>
static void readVoxel (std::istream &is, VoxelT &voxel)
 Read a voxel from the out stream.
 
template<typename VoxelT>
static void write (const VoxelGrid< VoxelT > &voxelGrid, const std::string &filename)
 Write a voxel grid to a file.
 
template<typename VoxelT>
static void write (const VoxelGrid< VoxelT > &voxelGrid, std::ostream &os)
 Write a voxel grid to an out-stream.
 
template<typename VoxelT>
static void writeVoxel (std::ostream &os, const VoxelT &voxel)
 Write a voxel to the out stream.
 

Detailed Description

Definition at line 12 of file BinaryIO.h.

Member Function Documentation

◆ read() [1/4]

template<typename VoxelGridT>
VoxelGridT read ( const std::string & filename)
static

Read a voxel grid from the filename.

The specified voxel grid type VoxelGridT must provide a default constructor. Sets voxelGrid's layout and fills the voxel data. is must be open in binary mode with a valid voxel grid file.

Definition at line 161 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ read() [2/4]

template<typename VoxelGridT>
VoxelGridT read ( std::istream & is)
static

Read a voxel grid from the in-stream.

The specified voxel grid type VoxelGridT must provide a default constructor. Sets voxelGrid's layout and fills the voxel data. is must be open in binary mode with a valid voxel grid file.

Definition at line 170 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ read() [3/4]

template<typename VoxelT>
void read ( VoxelGrid< VoxelT > & voxelGrid,
const std::string & filename )
static

Read a voxel grid from the file.

Sets voxelGrid's layout and fills the voxel data.

Definition at line 179 of file BinaryIO.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read() [4/4]

template<typename VoxelT>
void read ( VoxelGrid< VoxelT > & voxelGrid,
std::istream & is )
static

Read a voxel grid from the in-stream.

Sets voxelGrid's layout and fills the voxel data. is must be open in binary mode with a valid voxel grid file.

Definition at line 205 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ readVoxel()

template<typename VoxelT>
void readVoxel ( std::istream & is,
VoxelT & voxel )
static

Read a voxel from the out stream.

This is a free template method used by voxel_grid_io::read(), so you can specialize it if necessary.

Definition at line 147 of file BinaryIO.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write() [1/2]

template<typename VoxelT>
void write ( const VoxelGrid< VoxelT > & voxelGrid,
const std::string & filename )
static

Write a voxel grid to a file.

Definition at line 258 of file BinaryIO.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write() [2/2]

template<typename VoxelT>
void write ( const VoxelGrid< VoxelT > & voxelGrid,
std::ostream & os )
static

Write a voxel grid to an out-stream.

The out-stream os must be open in binary mode.

Definition at line 284 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ writeVoxel()

template<typename VoxelT>
void writeVoxel ( std::ostream & os,
const VoxelT & voxel )
static

Write a voxel to the out stream.

This is a free template method used by voxel_grid_io::write(), so you can specialize it if necessary.

Definition at line 154 of file BinaryIO.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: