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
115 vector<float> getVertices();
120 vector<uint32_t> getFaceIds();
125 vector<float> getVertexNormals();
130 vector<uint8_t> getVertexColors();
136 vector<PlutoMapImage> getTextures();
142 unordered_map<Vec, vector<float>> getFeatures();
147 vector<PlutoMapMaterial> getMaterials();
152 vector<uint32_t> getMaterialFaceIndices();
157 vector<float> getVertexTextureCoords();
162 vector<string> getLabelGroups();
167 vector<string> getAllLabelsOfGroup(
string groupName);
173 vector<uint32_t> getFaceIdsOfLabel(
string groupName,
string labelName);
178 vector<float> getRoughness();
183 vector<float> getHeightDifference();
193 hf::DataSet addVertexNormals(vector<float>& normals);
203 void addTexture(
int index, uint32_t
width, uint32_t
height, uint8_t*
data);
208 void addMaterials(vector<PlutoMapMaterial>& materials, vector<uint32_t>& matFaceIndices);
213 void addVertexTextureCoords(vector<float>& coords);
219 void addLabel(
string groupName,
string labelName, vector<uint32_t>& faceIds);
225 template<
typename BaseVecT>
226 void addTextureKeypointsMap(unordered_map<BaseVecT, std::vector<float>>& keypoints_map);
231 void addRoughness(vector<float>& roughness);
236 void addHeightDifference(vector<float>& diff);
243 const uint32_t width,
244 const uint32_t height,
245 const uint8_t* pixelBuffer
256 bool removeAllLabels();
268 static constexpr
const char* GEOMETRY_GROUP =
"/geometry";
269 static constexpr
const char* ATTRIBUTES_GROUP =
"/attributes";
270 static constexpr
const char* CLUSTERSETS_GROUP =
"/clustersets";
271 static constexpr
const char* TEXTURES_GROUP =
"/textures";
272 static constexpr
const char* LABELS_GROUP =
"/labels";
299 _hid = H5Tcopy(materialHid);
304 #include "PlutoMapIO.tcc" 306 #endif // __LVR2_PLUTOMAPIO_HPP_
hf::Group m_clusterSetsGroup
hf::Group m_attributesGroup
hf::Group m_geometryGroup
create an HDF5 DataType from a C++ type
hf::Group m_texturesGroup