Go to the documentation of this file.
33 #ifndef __LVR2_PLUTOMAPIO_HPP_
34 #define __LVR2_PLUTOMAPIO_HPP_
40 #include <unordered_map>
42 #include <H5Tpublic.h>
51 using std::unordered_map;
56 using Vec = BaseVector<float>;
103 const vector<float>& vertices,
104 const vector<uint32_t>& face_ids
203 void addTexture(
int index, uint32_t width, uint32_t height, uint8_t* data);
208 void addMaterials(vector<PlutoMapMaterial>& materials, vector<uint32_t>& matFaceIndices);
219 void addLabel(
string groupName,
string labelName, vector<uint32_t>& faceIds);
225 template<
typename BaseVecT>
243 const uint32_t width,
244 const uint32_t height,
245 const uint8_t* pixelBuffer
299 _hid = H5Tcopy(materialHid);
304 #include "PlutoMapIO.tcc"
306 #endif // __LVR2_PLUTOMAPIO_HPP_
hf::Group m_texturesGroup
hf::DataSet addVertexNormals(vector< float > &normals)
Add normals to the attributes group.
vector< PlutoMapMaterial > getMaterials()
Returns materials as PlutoMapMaterial.
static constexpr const char * ATTRIBUTES_GROUP
static constexpr const char * LABELS_GROUP
static constexpr const char * TEXTURES_GROUP
void addHeightDifference(vector< float > &diff)
Adds the height difference to the attributes group.
static constexpr const char * CLUSTERSETS_GROUP
vector< uint32_t > getMaterialFaceIndices()
Returns material <-> face indices.
unordered_map< Vec, vector< float > > getFeatures()
Returns an map which keys are representing the features point in space and the values are an vector o...
hf::DataSet addVertexColors(vector< uint8_t > &colors)
Add vertex colors to the attributes group.
vector< float > getRoughness()
Returns the roughness as float vector.
void addTexture(int index, uint32_t width, uint32_t height, uint8_t *data)
hf::Group m_attributesGroup
void addLabel(string groupName, string labelName, vector< uint32_t > &faceIds)
Adds the label (labelName) to the label group with the given faces. E.g.: tree_1 -> groupName=tree; l...
void addVertexTextureCoords(vector< float > &coords)
Add vertex texture coordinates to the textures group.
vector< float > getHeightDifference()
Returns the height difference as float vector.
vector< float > getVertices()
Returns vertices vector.
void addTextureKeypointsMap(unordered_map< BaseVecT, std::vector< float >> &keypoints_map)
Adds the keypoints with their corresponding positions to the attributes_group. The position is saved ...
hf::Group m_geometryGroup
void addMaterials(vector< PlutoMapMaterial > &materials, vector< uint32_t > &matFaceIndices)
Add materials as PlutoMapMaterial and the corresponding material <-> face indices.
vector< float > getVertexNormals()
Returns vertex normals vector.
vector< PlutoMapImage > getTextures()
Returns textures vector.
vector< uint32_t > getFaceIds()
Returns face ids vector.
static constexpr const char * GEOMETRY_GROUP
void addRoughness(vector< float > &roughness)
Adds the roughness to the attributes group.
~PlutoMapIO()
Closes main groups and makes sure all buffers are flushed to the file on disc.
vector< float > getVertexTextureCoords()
Returns vertex texture coordinates.
void flush()
Flushes the file. All opened buffers are saved to disc.
PlutoMapIO(string filename)
Opens a Pluto map file for reading and writing.
vector< uint8_t > getVertexColors()
Returns vertex colors vector.
void addImage(hf::Group group, string name, const uint32_t width, const uint32_t height, const uint8_t *pixelBuffer)
Adds an image with given data set name to the given group.
PlutoMapImage getImage(hf::Group group, string name)
Returns the image in the group, if it exists. If not an empty struct is returned.
vector< string > getLabelGroups()
Returns all available label groups.
vector< uint32_t > getFaceIdsOfLabel(string groupName, string labelName)
Returns face ids for the given label inside the group. E.g: label=tree_1 -> groupName=tree; labelName...
vector< string > getAllLabelsOfGroup(string groupName)
Returns all labels inside the given group.
hf::Group m_clusterSetsGroup
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:24