Template Class ChunkIO

Class Documentation

template<typename BaseIO>
class ChunkIO

Public Functions

ChunkIO()
ChunkIO(std::string filePath)

ChunkIO used for saving and loading chunks into/from a HDF5-file.

void writeBasicStructure(BaseVector<std::size_t> amount, float chunksize, BoundingBox<BaseVector<float>> boundingBox)

write amount, chunksize and the bounding box in the hdf5 file

void writeChunk(lvr2::MeshBufferPtr mesh, size_t x, size_t y, size_t z)

write a mesh in a group with the given cellIndex

lvr2::MeshBufferPtr loadChunk(std::string chunkName)

load a mesh from a group with the given cellIndex

BaseVector<size_t> loadAmount()

loads and returns a BaseVector with the amount of chunks in each dimension

BoundingBox<BaseVector<float>> loadBoundingBox()

loads and returns the bounding box for the complete original mesh (that got chunked)

float loadChunkSize()

loads and returns the chunksize

void writeVoxelSize(float voxelSize)

save reconstruction voxelsize in HDF5

float readVoxelSize()

returns the voxelsize

boost::shared_array<bool> lsrLoadExtruded(string chunkName)

load the extruded value for the cells/voxel of one chunk

boost::shared_array<float> lsrLoadQueryPoints(string chunkName)

loads and returns the Querypoint-distances for the cells/voxel of one chunk

size_t lsrLoadNumCells(string chunkName)

loads and returns the number of cells/voxel in the chunk

boost::shared_array<float> lsrLoadCenters(string chunkName)

loads and returns the centers for the cells/voxel in one chunk

void writeTSDF(string cellName, size_t csize, boost::shared_array<float> centers, boost::shared_array<bool> extruded, boost::shared_array<float> queryPoints)

Writes the parameters in the HDF5 file.

Parameters:
  • chunkName – name of the chunk (typically the grid coordinates)

  • csize – number of cells/voxel in the chunk

  • centers – center values for the voxel

  • extruded – extruded values for the voxel

  • queryPoints – Querypoint distances for the voxel

void saveAmount(BaseVector<std::size_t> amount)
void saveChunkSize(float chunkSize)
void saveBoundingBox(BoundingBox<BaseVector<float>> boundingBox)
void save(BaseVector<std::size_t> amount, float chunkSize, BoundingBox<BaseVector<float>> boundingBox)
template<typename T>
void saveChunk(T data, std::string layer, int x, int y, int z)
BaseVector<size_t> loadAmount()
float loadChunkSize()
BoundingBox<BaseVector<float>> loadBoundingBox()
template<typename T>
T loadChunk(std::string layer, int x, int y, int z)

Protected Attributes

BaseIO *m_file_access = static_cast<BaseIO*>(this)
ArrayIO<BaseIO> *m_array_io = static_cast<ArrayIO<BaseIO>*>(m_file_access)