3 #include "AbstractGeometryFilter.h" 18 Voxel *voxel =
nullptr;
19 Mat<double> *matrix =
nullptr;
21 double closestPointDistance = std::numeric_limits<double>::max();
35 static int const minPointsForSafeNormalEstimation = 3;
39 static size_t const batchSize = 10000000;
44 static int const voxelPopulationThreshold = 40000;
51 std::string separator =
" ";
59 double maxColorValue = 0;
64 bool snapNeighborNormal =
false;
69 bool assignDefaultNormal =
false;
73 glm::dvec3 defaultNormal = glm::dvec3(0,0,0);
78 size_t unsafeNormalEstimations = 0;
84 size_t discardedPointsByNormal = 0;
187 void parse(std::string
const & filePath);
195 void firstPass(
string const & filePathString, ifstream &ifs);
204 string const &filePathString,
205 string const &matName,
218 void prepareVoxelsGrid(
219 int &estimateNormals,
220 double &halfVoxelSize
233 double halfVoxelSize,
234 string const &filePathString
256 double halfVoxelSize,
273 void postProcess(
string const &matName,
int estimateNormals);
278 void estimateNormals(ifstream &ifs);
287 void estimateNormalsBatch(ifstream &ifs);
295 void _estimateNormals(
size_t start,
size_t end);
299 void voxelsGridToScenePart();
308 size_t indexFromCoordinates(
309 double x,
double y,
double z,
310 size_t &I,
size_t &J,
size_t &K
320 static bool isLineComment(
string const & line);
325 static void restartInputFileStream(ifstream &ifs);
size_t n
The number of points in the point cloud.
Definition: XYZPointCloudFileLoader.h:89
size_t maxNVoxels
Total size of full voxels grid.
Definition: XYZPointCloudFileLoader.h:169
size_t nx
Number of partitions along x-axis.
Definition: XYZPointCloudFileLoader.h:118
double minZ
Minimum Z coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:101
double minX
Minimum X coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:93
double zCoeff
Coefficient ( ) to compute voxel index for a given coordinate.
Definition: XYZPointCloudFileLoader.h:159
size_t nz
Number of partitions along z-axis.
Definition: XYZPointCloudFileLoader.h:126
VoxelGridCell is used to build and fill all necessary voxels to represent input point cloud...
Definition: XYZPointCloudFileLoader.h:17
double minY
Minimum Y coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:97
double maxX
Maximum X coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:105
size_t numBatches
How many batches are necessary to estimate normals.
Definition: XYZPointCloudFileLoader.h:173
Class representing a voxel primitive.
Definition: Voxel.h:11
double xCoeff
Coefficient ( ) to compute voxel index for a given coordinate.
Definition: XYZPointCloudFileLoader.h:141
Import point cloud files abstracting them to a set of voxels.
Definition: XYZPointCloudFileLoader.h:27
size_t lastNumVoxels
Used to correctly report number of voxels for each part when reading multiple files at once (i...
Definition: XYZPointCloudFileLoader.h:179
double maxZ
Maximum Z coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:113
double maxY
Maximum Y coordinate considering all points.
Definition: XYZPointCloudFileLoader.h:109
double yCoeff
Coefficient ( ) to compute voxel index for a given coordinate.
Definition: XYZPointCloudFileLoader.h:150
Class representing a scene part.
Definition: ScenePart.h:16
size_t nynz
Product . Stored in a variable because of its recurrent usage.
Definition: XYZPointCloudFileLoader.h:131
Abstract class defining asset loading filters common behavior.
Definition: AbstractGeometryFilter.h:18
XYZPointCloudFileLoader()
Constructor for point cloud loader.
Definition: XYZPointCloudFileLoader.h:334
size_t ny
Number of partitions along y-axis.
Definition: XYZPointCloudFileLoader.h:122