Public Member Functions | Protected Attributes | Private Attributes | List of all members
lvr2::ChunkIO< FeatureBase > Class Template Reference

#include <ChunkIO.hpp>

Public Member Functions

 ChunkIO ()
 
 ChunkIO (std::string filePath)
 ChunkIO used for saving and loading chunks into/from a HDF5-file. More...
 
BaseVector< size_t > loadAmount ()
 
BaseVector< size_t > loadAmount ()
 loads and returns a BaseVector with the amount of chunks in each dimension More...
 
BoundingBox< BaseVector< float > > loadBoundingBox ()
 
BoundingBox< BaseVector< float > > loadBoundingBox ()
 loads and returns the bounding box for the complete original mesh (that got chunked) More...
 
template<typename T >
loadChunk (std::string layer, int x, int y, int z)
 
lvr2::MeshBufferPtr loadChunk (std::string chunkName)
 load a mesh from a group with the given cellIndex More...
 
float loadChunkSize ()
 
float loadChunkSize ()
 loads and returns the chunksize More...
 
boost::shared_array< float > lsrLoadCenters (string chunkName)
 loads and returns the centers for the cells/voxel in one chunk More...
 
boost::shared_array< bool > lsrLoadExtruded (string chunkName)
 load the extruded value for the cells/voxel of one chunk More...
 
size_t lsrLoadNumCells (string chunkName)
 loads and returns the number of cells/voxel in the chunk More...
 
boost::shared_array< float > lsrLoadQueryPoints (string chunkName)
 loads and returns the Querypoint-distances for the cells/voxel of one chunk More...
 
float readVoxelSize ()
 returns the voxelsize More...
 
void save (BaseVector< std::size_t > amount, float chunkSize, BoundingBox< BaseVector< float >> boundingBox)
 
void saveAmount (BaseVector< std::size_t > amount)
 
void saveBoundingBox (BoundingBox< BaseVector< float >> boundingBox)
 
template<typename T >
void saveChunk (T data, std::string layer, int x, int y, int z)
 
void saveChunkSize (float chunkSize)
 
void writeBasicStructure (BaseVector< std::size_t > amount, float chunksize, BoundingBox< BaseVector< float >> boundingBox)
 write amount, chunksize and the bounding box in the hdf5 file More...
 
void writeChunk (lvr2::MeshBufferPtr mesh, size_t x, size_t y, size_t z)
 write a mesh in a group with the given cellIndex More...
 
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. More...
 
void writeVoxelSize (float voxelSize)
 save reconstruction voxelsize in HDF5 More...
 

Protected Attributes

ArrayIO< FeatureBase > * m_array_io = static_cast<ArrayIO<FeatureBase>*>(m_file_access)
 
FeatureBasem_file_access = static_cast<FeatureBase*>(this)
 

Private Attributes

const std::string m_amountName = "amount"
 
const std::string m_boundingBoxName = "bounding_box"
 
const std::string m_chunkName = "chunks"
 
const std::string m_chunkSizeName = "size"
 
std::string m_filePath
 
ChunkHDF5IO m_hdf5IO
 

Detailed Description

template<typename FeatureBase>
class lvr2::ChunkIO< FeatureBase >

Definition at line 54 of file ChunkIO.hpp.

Constructor & Destructor Documentation

◆ ChunkIO() [1/2]

template<typename FeatureBase >
lvr2::ChunkIO< FeatureBase >::ChunkIO ( )
default

◆ ChunkIO() [2/2]

template<typename FeatureBase >
lvr2::ChunkIO< FeatureBase >::ChunkIO ( std::string  filePath)

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

Definition at line 47 of file ChunkIO.cpp.

Member Function Documentation

◆ loadAmount() [1/2]

template<typename FeatureBase >
BaseVector<size_t> lvr2::ChunkIO< FeatureBase >::loadAmount ( )

◆ loadAmount() [2/2]

template<typename FeatureBase >
BaseVector< size_t > lvr2::ChunkIO< FeatureBase >::loadAmount ( )

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

Definition at line 83 of file ChunkIO.cpp.

◆ loadBoundingBox() [1/2]

template<typename FeatureBase >
BoundingBox<BaseVector<float> > lvr2::ChunkIO< FeatureBase >::loadBoundingBox ( )

◆ loadBoundingBox() [2/2]

template<typename FeatureBase >
BoundingBox< BaseVector< float > > lvr2::ChunkIO< FeatureBase >::loadBoundingBox ( )

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

Definition at line 120 of file ChunkIO.cpp.

◆ loadChunk() [1/2]

template<typename FeatureBase >
template<typename T >
T lvr2::ChunkIO< FeatureBase >::loadChunk ( std::string  layer,
int  x,
int  y,
int  z 
)

◆ loadChunk() [2/2]

template<typename FeatureBase >
lvr2::MeshBufferPtr lvr2::ChunkIO< FeatureBase >::loadChunk ( std::string  chunkName)

load a mesh from a group with the given cellIndex

Definition at line 140 of file ChunkIO.cpp.

◆ loadChunkSize() [1/2]

template<typename FeatureBase >
float lvr2::ChunkIO< FeatureBase >::loadChunkSize ( )

◆ loadChunkSize() [2/2]

template<typename FeatureBase >
float lvr2::ChunkIO< FeatureBase >::loadChunkSize ( )

loads and returns the chunksize

Definition at line 101 of file ChunkIO.cpp.

◆ lsrLoadCenters()

template<typename FeatureBase >
boost::shared_array< float > lvr2::ChunkIO< FeatureBase >::lsrLoadCenters ( string  chunkName)

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

Definition at line 185 of file ChunkIO.cpp.

◆ lsrLoadExtruded()

template<typename FeatureBase >
boost::shared_array< bool > lvr2::ChunkIO< FeatureBase >::lsrLoadExtruded ( string  chunkName)

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

Definition at line 250 of file ChunkIO.cpp.

◆ lsrLoadNumCells()

template<typename FeatureBase >
size_t lvr2::ChunkIO< FeatureBase >::lsrLoadNumCells ( string  chunkName)

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

Definition at line 209 of file ChunkIO.cpp.

◆ lsrLoadQueryPoints()

template<typename FeatureBase >
boost::shared_array< float > lvr2::ChunkIO< FeatureBase >::lsrLoadQueryPoints ( string  chunkName)

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

Definition at line 226 of file ChunkIO.cpp.

◆ readVoxelSize()

template<typename FeatureBase >
float lvr2::ChunkIO< FeatureBase >::readVoxelSize ( )

returns the voxelsize

Definition at line 156 of file ChunkIO.cpp.

◆ save()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::save ( BaseVector< std::size_t >  amount,
float  chunkSize,
BoundingBox< BaseVector< float >>  boundingBox 
)

◆ saveAmount()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::saveAmount ( BaseVector< std::size_t >  amount)

◆ saveBoundingBox()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::saveBoundingBox ( BoundingBox< BaseVector< float >>  boundingBox)

◆ saveChunk()

template<typename FeatureBase >
template<typename T >
void lvr2::ChunkIO< FeatureBase >::saveChunk ( data,
std::string  layer,
int  x,
int  y,
int  z 
)

◆ saveChunkSize()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::saveChunkSize ( float  chunkSize)

◆ writeBasicStructure()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::writeBasicStructure ( BaseVector< std::size_t >  amount,
float  chunksize,
BoundingBox< BaseVector< float >>  boundingBox 
)

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

Definition at line 53 of file ChunkIO.cpp.

◆ writeChunk()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::writeChunk ( lvr2::MeshBufferPtr  mesh,
size_t  x,
size_t  y,
size_t  z 
)

write a mesh in a group with the given cellIndex

Definition at line 70 of file ChunkIO.cpp.

◆ writeTSDF()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::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
chunkNamename of the chunk (typically the grid coordinates)
csizenumber of cells/voxel in the chunk
centerscenter values for the voxel
extrudedextruded values for the voxel
queryPointsQuerypoint distances for the voxel

Definition at line 163 of file ChunkIO.cpp.

◆ writeVoxelSize()

template<typename FeatureBase >
void lvr2::ChunkIO< FeatureBase >::writeVoxelSize ( float  voxelSize)

save reconstruction voxelsize in HDF5

Definition at line 145 of file ChunkIO.cpp.

Member Data Documentation

◆ m_amountName

template<typename FeatureBase >
const std::string lvr2::ChunkIO< FeatureBase >::m_amountName = "amount"
private

Definition at line 140 of file ChunkIO.hpp.

◆ m_array_io

template<typename FeatureBase >
ArrayIO<FeatureBase>* lvr2::ChunkIO< FeatureBase >::m_array_io = static_cast<ArrayIO<FeatureBase>*>(m_file_access)
protected

Definition at line 56 of file descriptions/ChunkIO.hpp.

◆ m_boundingBoxName

template<typename FeatureBase >
const std::string lvr2::ChunkIO< FeatureBase >::m_boundingBoxName = "bounding_box"
private

Definition at line 142 of file ChunkIO.hpp.

◆ m_chunkName

template<typename FeatureBase >
const std::string lvr2::ChunkIO< FeatureBase >::m_chunkName = "chunks"
private

Definition at line 139 of file ChunkIO.hpp.

◆ m_chunkSizeName

template<typename FeatureBase >
const std::string lvr2::ChunkIO< FeatureBase >::m_chunkSizeName = "size"
private

Definition at line 141 of file ChunkIO.hpp.

◆ m_file_access

template<typename FeatureBase >
FeatureBase* lvr2::ChunkIO< FeatureBase >::m_file_access = static_cast<FeatureBase*>(this)
protected

Definition at line 55 of file descriptions/ChunkIO.hpp.

◆ m_filePath

template<typename FeatureBase >
std::string lvr2::ChunkIO< FeatureBase >::m_filePath
private

Definition at line 133 of file ChunkIO.hpp.

◆ m_hdf5IO

template<typename FeatureBase >
ChunkHDF5IO lvr2::ChunkIO< FeatureBase >::m_hdf5IO
private

Definition at line 135 of file ChunkIO.hpp.


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


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:11