Public Member Functions | Protected Member Functions | List of all members
lvr2::DirectoryKernel Class Reference

#include <DirectoryKernel.hpp>

Inheritance diagram for lvr2::DirectoryKernel:
Inheritance graph
[legend]

Public Member Functions

 DirectoryKernel (const std::string &root)
 
virtual bool exists (const std::string &group) const
 
virtual bool exists (const std::string &group, const std::string &container) const
 
virtual doubleArr loadDoubleArray (const std::string &group, const std::string &container, std::vector< size_t > &dims) const
 
virtual floatArr loadFloatArray (const std::string &group, const std::string &container, std::vector< size_t > &dims) const
 
virtual boost::optional< cv::Mat > loadImage (const std::string &group, const std::string &container) const
 
virtual MeshBufferPtr loadMeshBuffer (const std::string &group, const std::string container) const
 
virtual void loadMetaYAML (const std::string &group, const std::string &container, YAML::Node &node) const
 
virtual PointBufferPtr loadPointBuffer (const std::string &group, const std::string &container) const
 
virtual ucharArr loadUCharArray (const std::string &group, const std::string &container, std::vector< size_t > &dims) const
 
virtual void saveDoubleArray (const std::string &groupName, const std::string &datasetName, const std::vector< size_t > &dimensions, const boost::shared_array< double > &data) const
 
virtual void saveFloatArray (const std::string &groupName, const std::string &datasetName, const std::vector< size_t > &dimensions, const boost::shared_array< float > &data) const
 
virtual void saveImage (const std::string &group, const std::string &container, const cv::Mat &image) const
 
virtual void saveMeshBuffer (const std::string &group, const std::string &container, const MeshBufferPtr &buffer) const
 
virtual void saveMetaYAML (const std::string &group, const std::string &metaName, const YAML::Node &node) const
 
virtual void savePointBuffer (const std::string &group, const std::string &container, const PointBufferPtr &buffer) const
 
virtual void saveUCharArray (const std::string &groupName, const std::string &datasetName, const std::vector< size_t > &dimensions, const boost::shared_array< unsigned char > &data) const
 
virtual void subGroupNames (const std::string &group, const std::regex &filter, std::vector< string > &subGroupNames) const
 
virtual void subGroupNames (const std::string &group, std::vector< string > &subGroupNames) const
 
virtual ~DirectoryKernel ()=default
 
- Public Member Functions inherited from lvr2::FileKernel
 FileKernel ()=delete
 
 FileKernel (const std::string &res)
 

Protected Member Functions

boost::filesystem::path getAbsolutePath (const std::string &group, const std::string &name) const
 
template<typename T >
boost::shared_array< T > loadArray (const std::string &group, const std::string &constainer, std::vector< size_t > &dims) const
 
template<typename T >
void saveArray (const std::string &group, const std::string &container, const std::vector< size_t > &dims, const boost::shared_array< T > &data) const
 

Additional Inherited Members

- Protected Attributes inherited from lvr2::FileKernel
std::string m_fileResourceName
 

Detailed Description

Definition at line 16 of file DirectoryKernel.hpp.

Constructor & Destructor Documentation

◆ DirectoryKernel()

lvr2::DirectoryKernel::DirectoryKernel ( const std::string &  root)
inline

Definition at line 19 of file DirectoryKernel.hpp.

◆ ~DirectoryKernel()

virtual lvr2::DirectoryKernel::~DirectoryKernel ( )
virtualdefault

Member Function Documentation

◆ exists() [1/2]

bool lvr2::DirectoryKernel::exists ( const std::string &  group) const
virtual

Implements lvr2::FileKernel.

Definition at line 128 of file DirectoryKernel.cpp.

◆ exists() [2/2]

bool lvr2::DirectoryKernel::exists ( const std::string &  group,
const std::string &  container 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 132 of file DirectoryKernel.cpp.

◆ getAbsolutePath()

boost::filesystem::path lvr2::DirectoryKernel::getAbsolutePath ( const std::string &  group,
const std::string &  name 
) const
protected

Definition at line 173 of file DirectoryKernel.cpp.

◆ loadArray()

template<typename T >
boost::shared_array<T> lvr2::DirectoryKernel::loadArray ( const std::string &  group,
const std::string &  constainer,
std::vector< size_t > &  dims 
) const
inlineprotected

Definition at line 98 of file DirectoryKernel.hpp.

◆ loadDoubleArray()

doubleArr lvr2::DirectoryKernel::loadDoubleArray ( const std::string &  group,
const std::string &  container,
std::vector< size_t > &  dims 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 194 of file DirectoryKernel.cpp.

◆ loadFloatArray()

floatArr lvr2::DirectoryKernel::loadFloatArray ( const std::string &  group,
const std::string &  container,
std::vector< size_t > &  dims 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 189 of file DirectoryKernel.cpp.

◆ loadImage()

boost::optional< cv::Mat > lvr2::DirectoryKernel::loadImage ( const std::string &  group,
const std::string &  container 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 98 of file DirectoryKernel.cpp.

◆ loadMeshBuffer()

MeshBufferPtr lvr2::DirectoryKernel::loadMeshBuffer ( const std::string &  group,
const std::string  container 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 70 of file DirectoryKernel.cpp.

◆ loadMetaYAML()

void lvr2::DirectoryKernel::loadMetaYAML ( const std::string &  group,
const std::string &  container,
YAML::Node &  node 
) const
virtual

That we don't return the YAML node is on purpose to use the initial structure to look for the fields that should be loaded!

Implements lvr2::FileKernel.

Definition at line 117 of file DirectoryKernel.cpp.

◆ loadPointBuffer()

PointBufferPtr lvr2::DirectoryKernel::loadPointBuffer ( const std::string &  group,
const std::string &  container 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 83 of file DirectoryKernel.cpp.

◆ loadUCharArray()

ucharArr lvr2::DirectoryKernel::loadUCharArray ( const std::string &  group,
const std::string &  container,
std::vector< size_t > &  dims 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 184 of file DirectoryKernel.cpp.

◆ saveArray()

template<typename T >
void lvr2::DirectoryKernel::saveArray ( const std::string &  group,
const std::string &  container,
const std::vector< size_t > &  dims,
const boost::shared_array< T > &  data 
) const
inlineprotected

Definition at line 126 of file DirectoryKernel.hpp.

◆ saveDoubleArray()

void lvr2::DirectoryKernel::saveDoubleArray ( const std::string &  groupName,
const std::string &  datasetName,
const std::vector< size_t > &  dimensions,
const boost::shared_array< double > &  data 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 204 of file DirectoryKernel.cpp.

◆ saveFloatArray()

void lvr2::DirectoryKernel::saveFloatArray ( const std::string &  groupName,
const std::string &  datasetName,
const std::vector< size_t > &  dimensions,
const boost::shared_array< float > &  data 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 199 of file DirectoryKernel.cpp.

◆ saveImage()

void lvr2::DirectoryKernel::saveImage ( const std::string &  group,
const std::string &  container,
const cv::Mat &  image 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 39 of file DirectoryKernel.cpp.

◆ saveMeshBuffer()

void lvr2::DirectoryKernel::saveMeshBuffer ( const std::string &  group,
const std::string &  container,
const MeshBufferPtr buffer 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 6 of file DirectoryKernel.cpp.

◆ saveMetaYAML()

void lvr2::DirectoryKernel::saveMetaYAML ( const std::string &  group,
const std::string &  metaName,
const YAML::Node &  node 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 54 of file DirectoryKernel.cpp.

◆ savePointBuffer()

void lvr2::DirectoryKernel::savePointBuffer ( const std::string &  group,
const std::string &  container,
const PointBufferPtr buffer 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 23 of file DirectoryKernel.cpp.

◆ saveUCharArray()

void lvr2::DirectoryKernel::saveUCharArray ( const std::string &  groupName,
const std::string &  datasetName,
const std::vector< size_t > &  dimensions,
const boost::shared_array< unsigned char > &  data 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 209 of file DirectoryKernel.cpp.

◆ subGroupNames() [1/2]

void lvr2::DirectoryKernel::subGroupNames ( const std::string &  group,
const std::regex &  filter,
std::vector< string > &  subGroupNames 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 156 of file DirectoryKernel.cpp.

◆ subGroupNames() [2/2]

void lvr2::DirectoryKernel::subGroupNames ( const std::string &  group,
std::vector< string > &  subGroupNames 
) const
virtual

Implements lvr2::FileKernel.

Definition at line 143 of file DirectoryKernel.cpp.


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 Wed Mar 2 2022 00:37:27