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

Detailed Description

Definition at line 14 of file BinaryIO.h.

Member Function Documentation

◆ read() [1/4]

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 163 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ read() [2/4]

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 171 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ read() [3/4]

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 caller graph for this function:

◆ read() [4/4]

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 204 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ readVoxel()

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 150 of file BinaryIO.h.

◆ write() [1/2]

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

Write a voxel grid to a file.

Definition at line 257 of file BinaryIO.h.

◆ write() [2/2]

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 282 of file BinaryIO.h.

+ Here is the call graph for this function:

◆ writeVoxel()

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 156 of file BinaryIO.h.


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