57 boost::shared_array<size_t> amountArr(
new size_t[3] {amount.
x, amount.
y, amount.
z});
60 boost::shared_array<float> chunkSizeArr(
new float[1] {chunksize});
63 boost::shared_array<float> boundingBoxArr(
64 new float[6] {boundingBox.getMin()[0], boundingBox.getMin()[1], boundingBox.getMin()[2],
65 boundingBox.getMax()[0], boundingBox.getMax()[1], boundingBox.getMax()[2]});
66 std::vector<size_t> boundingBoxDim({2, 3});
73 std::string cellName = std::to_string(x) +
"_" + std::to_string(y) +
"_" + std::to_string(z);
74 if (!chunks.
exist(cellName))
86 size_t dimensionAmount;
87 boost::shared_array<size_t> amountArr
89 if(dimensionAmount != 3)
91 std::cout <<
"Error loading chunk data: amount has not the right dimension. Real: "
92 << dimensionAmount <<
"; Expected: 3" << std::endl;
104 size_t dimensionChunkSize;
105 boost::shared_array<float> chunkSizeArr
107 if(dimensionChunkSize != 1)
109 std::cout <<
"Error loading chunk data: chunkSize has not the right dimension. Real: "
110 << dimensionChunkSize <<
"; Expected: 1" << std::endl;
115 chunkSize = chunkSizeArr[0];
123 std::vector<size_t> dimensionBox;
124 boost::shared_array<float> boundingBoxArr
126 if(dimensionBox.at(0) != 2 && dimensionBox.at(1) != 3)
128 std::cout <<
"Error loading chunk data: bounding_box has not the right dimension. Real: {"
129 << dimensionBox.at(0) <<
", " << dimensionBox.at(1) <<
"}; Expected: {2, 3}" << std::endl;
153 boost::shared_array<float> voxelSizeArr(
new float[1] {voxelSize});
160 return voxelSize.get()[0];
165 boost::shared_array<float> centers,
166 boost::shared_array<bool> extruded,
167 boost::shared_array<float> queryPoints) {
170 if (!chunks.
exist(chunkName))
175 boost::shared_array<size_t> numCellsArr = boost::shared_array<size_t>(
new size_t[1]);
176 numCellsArr.get()[0] = csize;
178 std::vector<size_t> centersDim({csize, 3});
181 std::vector<size_t> queryPointsDim({csize, 8});
189 if (!chunks.
exist(chunkName))
192 return boost::shared_array<float>();
197 std::vector<size_t> dimensionCenters;
198 boost::shared_array<float> centersArr
199 =
m_hdf5IO.ArrayIO::load<
float>(single_chunk,
"centers", dimensionCenters);
200 if (dimensionCenters.at(1) != 3)
202 std::cout <<
"Error loading chunk/tsdf data: centers has not the right dimension. Real: {"
203 << dimensionCenters.at(0) <<
", " << dimensionCenters.at(1) <<
"}; Expected: {N, 3}"
205 return boost::shared_array<float>();
213 if (!chunks.
exist(chunkName))
221 std::vector<size_t> dimensionNumCells;
222 boost::shared_array<float> numCellsArr
223 =
m_hdf5IO.ArrayIO::load<
float>(single_chunk,
"numCells", dimensionNumCells);
224 return numCellsArr.get()[0];
230 if (!chunks.
exist(chunkName))
233 return boost::shared_array<float>();
238 std::vector<size_t> dimensionQueryPoints;
239 boost::shared_array<float> qpArr
240 =
m_hdf5IO.ArrayIO::load<
float>(single_chunk,
"queryPoints", dimensionQueryPoints);
241 if (dimensionQueryPoints.at(1) != 8)
243 std::cout <<
"Error loading chunk/tsdf data: queryPoints has not the right dimension. Real: {"
244 << dimensionQueryPoints.at(0) <<
", " << dimensionQueryPoints.at(1) <<
"}; Expected: {N, 8}"
246 return boost::shared_array<float>();
254 if (!chunks.
exist(chunkName))
257 return boost::shared_array<bool>();
260 std::vector<size_t> dimensionExtruded;
261 boost::shared_array<bool> extrudedArr
262 =
m_hdf5IO.ArrayIO::load<
bool>(single_chunk,
"extruded", dimensionExtruded);