Primary class for terrestrial LiDAR scan. More...
#include <LiDAR.h>
Public Member Functions | |
| LiDARcloud () | |
| LiDAR point cloud constructor. | |
| ~LiDARcloud () | |
| LiDAR point cloud destructor. | |
| void | validateRayDirections () |
| void | disableMessages () |
| Disable all print messages to the screen except for fatal error messages. | |
| void | enableMessages () |
| Enable all print messages to the screen. | |
| void | setProgressCallback (std::function< void(float, const std::string &)> callback) |
| Register a callback to receive progress updates during syntheticScan. | |
| void | setCancelFlag (volatile int *flag) |
| Register an external cancellation flag polled during long-running operations. | |
| void | setSyntheticScanProgressPointer (volatile int *ptr) |
| Register an external counter for per-scan syntheticScan progress. | |
| void | initializeCollisionDetection (helios::Context *context) |
| Initialize collision detection plugin for unified ray-tracing (called automatically when needed) | |
| void | performUnifiedRayTracing (helios::Context *context, size_t N, int Npulse, helios::vec3 *ray_origins, helios::vec3 *direction, float *hit_t, float *hit_fnorm, int *hit_ID) |
| Perform unified ray-tracing using collision detection plugin (replaces CUDA kernels) | |
| uint | getScanCount () |
| Get number of scans in point cloud. | |
| uint | addScan (ScanMetadata &newscan) |
| Add a LiDAR scan to the point cloud. | |
| uint | addScanMoving (ScanMetadata scan, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec4 > &traj_quat, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float pulse_rate_hz, double t0=0.0) |
| Add a moving-platform (mobile/airborne) LiDAR scan driven by a 6-DOF pose trajectory. | |
| uint | addScanMoving (ScanMetadata scan, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec3 > &traj_rpy, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float pulse_rate_hz, double t0=0.0) |
| Add a moving-platform (mobile/airborne) LiDAR scan with the orientation trajectory given as Euler angles. | |
| uint | addScanSpinning (const std::vector< float > &beamElevationAngles, float azimuthStep_rad, float pulse_rate_hz, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec4 > &traj_quat, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float exitDiameter, float beamDivergence, float rangeNoiseStdDev, float angleNoiseStdDev, const std::vector< std::string > &columnFormat={"x", "y", "z"}, double t0=0.0) |
| Add a continuously-spinning multibeam (Velodyne/Ouster/Hesai-style) scan driven by a 6-DOF platform trajectory. | |
| uint | addScanSpinning (const std::vector< float > &beamElevationAngles, float azimuthStep_rad, float pulse_rate_hz, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec3 > &traj_rpy, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float exitDiameter, float beamDivergence, float rangeNoiseStdDev, float angleNoiseStdDev, const std::vector< std::string > &columnFormat={"x", "y", "z"}, double t0=0.0) |
| Add a continuously-spinning multibeam scan with the orientation trajectory given as Euler angles. | |
| uint | addScanMovingRaster (uint Ntheta, float thetaMin, float thetaMax, uint Nphi, float phiMin, float phiMax, float pulse_rate_hz, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec4 > &traj_quat, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float exitDiameter, float beamDivergence, float rangeNoiseStdDev, float angleNoiseStdDev, const std::vector< std::string > &columnFormat={"x", "y", "z"}, double t0=0.0) |
| Add a moving-platform raster scan: a fixed uniform angular fan swept while the platform moves along a trajectory. | |
| uint | addScanRisley (const std::vector< RisleyPrism > &prisms, double refractive_index_air, float pulse_rate_hz, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec4 > &traj_quat, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float exitDiameter, float beamDivergence, float rangeNoiseStdDev, float angleNoiseStdDev, const std::vector< std::string > &columnFormat={"x", "y", "z"}, double t0=0.0) |
| Add a rotating-Risley-prism (Livox-style rosette) scan from physical instrument parameters. | |
| uint | addScanRisley (const std::vector< RisleyPrism > &prisms, double refractive_index_air, float pulse_rate_hz, const std::vector< double > &traj_t, const std::vector< helios::vec3 > &traj_pos, const std::vector< helios::vec3 > &traj_rpy, const helios::vec3 &lever_arm, const helios::vec3 &boresight_rpy, float exitDiameter, float beamDivergence, float rangeNoiseStdDev, float angleNoiseStdDev, const std::vector< std::string > &columnFormat={"x", "y", "z"}, double t0=0.0) |
| Add a rotating-Risley-prism (Livox-style rosette) scan with the orientation trajectory given as Euler angles. | |
| void | addHitPoint (uint scanID, const helios::vec3 &xyz, const helios::SphericalCoord &direction) |
| Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction. | |
| void | addHitPoint (uint scanID, const helios::vec3 &xyz, const helios::SphericalCoord &direction, const helios::RGBcolor &color) |
| Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction. | |
| void | addHitPoint (uint scanID, const helios::vec3 &xyz, const helios::SphericalCoord &direction, const std::map< std::string, double > &data) |
| Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction. | |
| void | addHitPoint (uint scanID, const helios::vec3 &xyz, const helios::SphericalCoord &direction, const helios::RGBcolor &color, const std::map< std::string, double > &data) |
| Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction. | |
| void | addHitPoint (uint scanID, const helios::vec3 &xyz, const helios::int2 &row_column, const helios::RGBcolor &color, const std::map< std::string, double > &data) |
| Specify a scan point as a hit by providing the (x,y,z) coordinates and row,column in scan table. | |
| void | deleteHitPoint (uint index) |
| Delete a hit point in the scan. | |
| uint | getHitCount () const |
| Get the number of hit points in the point cloud. | |
| helios::vec3 | getScanOrigin (uint scanID) const |
| Get the (x,y,z) scan origin. | |
| uint | getScanSizeTheta (uint scanID) const |
| Get the number of scan points in the theta (zenithal) direction. | |
| uint | getScanSizePhi (uint scanID) const |
| Get the number of scan points in the phi (azimuthal) direction. | |
| helios::vec2 | getScanRangeTheta (uint scanID) const |
| Get the range of scan directions in the theta (zenithal) direction. | |
| helios::vec2 | getScanRangePhi (uint scanID) const |
| Get the range of scan directions in the phi (azimuthal) direction. | |
| float | getScanBeamExitDiameter (uint scanID) const |
| Get the diameter of the laser beam at exit from the instrument. | |
| std::vector< std::string > | getScanColumnFormat (uint scanID) const |
| Get the labels for columns in ASCII input/output file. | |
| ScanPattern | getScanPattern (uint scanID) const |
| Get the geometric beam pattern of a scan. | |
| std::vector< float > | getScanBeamZenithAngles (uint scanID) const |
| Get the per-channel zenith angles of a spinning multibeam scan. | |
| ScanMode | getScanMode (uint scanID) const |
| Get the high-level acquisition-mode descriptor of a scan. | |
| uint | getScanStepsPerRev (uint scanID) const |
| Get the number of azimuth firing steps per full 360-degree revolution of a spinning multibeam scan. | |
| double | getScanRotationRate (uint scanID) const |
| Get the sensor-head rotation rate of a spinning multibeam scan. | |
| double | getScanRevolutions (uint scanID) const |
| Get the total number of full 360-degree revolutions collected by a spinning multibeam scan. | |
| std::vector< RisleyPrism > | getScanRisleyPrisms (uint scanID) const |
| Get the rotating wedge prisms of a Risley-prism (Livox-style rosette) scan. | |
| double | getScanRisleyRefractiveIndexAir (uint scanID) const |
| Get the refractive index of the medium surrounding the prisms of a Risley-prism scan. | |
| float | getScanBeamDivergence (uint scanID) const |
| Divergence angle of the laser beam in radians. | |
| float | getScanRangeNoiseStdDev (uint scanID) const |
| Standard deviation of Gaussian range (along-beam) measurement noise in meters. | |
| float | getScanAngleNoiseStdDev (uint scanID) const |
| Standard deviation of Gaussian angular (beam-pointing) jitter in radians. | |
| ReturnMode | getScanReturnMode (uint scanID) const |
| Get the return-reporting mode of a scan. | |
| void | setScanReturnMode (uint scanID, ReturnMode returnMode) |
| Set the return-reporting mode of a scan. | |
| SingleReturnSelection | getScanSingleReturnSelection (uint scanID) const |
| Get the single-return selection policy of a scan. | |
| void | setScanSingleReturnSelection (uint scanID, SingleReturnSelection selection) |
| Set the single-return selection policy of a scan. | |
| int | getScanMaxReturns (uint scanID) const |
| Get the maximum number of returns reported per pulse in single/limited-return mode. | |
| void | setScanMaxReturns (uint scanID, int maxReturns) |
| Set the maximum number of returns reported per pulse in single/limited-return mode. | |
| float | getScanPulseWidth (uint scanID) const |
| Get the range resolution (transmit pulse range-extent) of a scan in meters. | |
| void | setScanPulseWidth (uint scanID, float pulseWidth) |
| Set the range resolution (transmit pulse range-extent) of a scan in meters. | |
| float | getScanDetectionThreshold (uint scanID) const |
| Get the detection threshold (minimum return energy fraction) of a scan. | |
| void | setScanDetectionThreshold (uint scanID, float detectionThreshold) |
| Set the detection threshold (minimum return energy fraction) of a scan. | |
| float | getScanTiltRoll (uint scanID) const |
| Get the global scanner tilt roll angle for a scan. | |
| float | getScanTiltPitch (uint scanID) const |
| Get the global scanner tilt pitch angle for a scan. | |
| float | getScanAzimuthOffset (uint scanID) const |
| Get the global scanner azimuth (heading) offset for a scan. | |
| helios::vec3 | getHitXYZ (uint index) const |
| Get (x,y,z) coordinate of hit point by index. | |
| helios::vec3 | getHitOrigin (uint index) const |
| Get the (x,y,z) origin from which the beam producing this hit point was emitted. | |
| helios::SphericalCoord | getHitRaydir (uint index) const |
| Get ray direction of hit point in the scan based on its index. | |
| double | getHitData (uint index, const char *label) const |
| Get floating point data value associated with a hit point. | |
| void | setHitData (uint index, const char *label, double value) |
| Set floating point data value associated with a hit point. | |
| bool | doesHitDataExist (uint index, const char *label) const |
| Check if scalar data exists for a hit point. | |
| int | getHitDataColumnIndex (const char *label) const |
| Get the internal column index for a hit-data label. | |
| void | getHitDataColumn (const char *label, std::vector< double > &data, double absent_value=-9999) const |
| Bulk-read a per-hit scalar field across all hits into a contiguous array. | |
| bool | isHitMiss (uint index) const |
| Determine whether a hit point is a "miss" (a fired pulse that returned nothing) | |
| bool | hasMisses () const |
| Determine whether the point cloud contains any miss points. | |
| helios::RGBcolor | getHitColor (uint index) const |
| Get color of hit point. | |
| int | getHitScanID (uint index) const |
| Get the scan with which a hit is associated. | |
| int | getHitIndex (uint scanID, uint row, uint column) const |
| Get the index of a scan point based on its row and column in the hit table. | |
| int | getHitGridCell (uint index) const |
| Get the grid cell in which the hit point resides. | |
| void | setHitGridCell (uint index, int cell) |
| Set the grid cell in which the hit point resides. | |
| void | coordinateShift (const helios::vec3 &shift) |
| Apply a translation to all points in the point cloud. | |
| void | coordinateShift (uint scanID, const helios::vec3 &shift) |
| Apply a translation to all points in a given scan. | |
| void | coordinateRotation (const helios::SphericalCoord &rotation) |
| Rotate all points in the point cloud about the origin. | |
| void | coordinateRotation (uint scanID, const helios::SphericalCoord &rotation) |
| Rotate all points in the point cloud about the origin. | |
| void | coordinateRotation (float rotation, const helios::vec3 &line_base, const helios::vec3 &line_direction) |
| Rotate all points in the point cloud about an arbitrary line. | |
| uint | getTriangleCount () const |
| Get the number of triangles formed by the triangulation. | |
| std::size_t | getTriangulationCandidateCount () const |
| std::size_t | getTriangulationDroppedByLmax () const |
| std::size_t | getTriangulationDroppedByAspect () const |
| std::size_t | getTriangulationDroppedByDegenerate () const |
| Triangulation | getTriangle (uint index) const |
| Get hit point corresponding to first vertex of triangle. | |
| void | loadXML (const char *filename) |
| Read an XML file containing scan information. | |
| void | loadXML (const char *filename, bool load_grid_only) |
| Read an XML file containing scan information. | |
| size_t | loadASCIIFile (uint scanID, const std::string &ASCII_data_file) |
| Load point cloud data from a tabular ASCII text file into an existing scan. | |
| void | exportTriangleNormals (const char *filename) |
| Export to file the normal vectors (nx,ny,nz) for all triangles formed. | |
| void | exportTriangleNormals (const char *filename, int gridcell) |
| Export to file the normal vectors (nx,ny,nz) for triangles formed within a single gridcell. | |
| void | exportTriangleAreas (const char *filename) |
| Export to file the area of all triangles formed. | |
| void | exportTriangleAreas (const char *filename, int gridcell) |
| Export to file the area of all triangles formed within a single grid cell. | |
| void | exportTriangleInclinationDistribution (const char *filename, uint Nbins) |
| void | exportTriangleAzimuthDistribution (const char *filename, uint Nbins) |
| void | exportLeafAreas (const char *filename) |
| Export to file the leaf area within each grid cell. Lines of the file correspond to each grid cell. | |
| void | exportLeafAreaDensities (const char *filename) |
| Export to file the leaf area density within each grid cell. Lines of the file correspond to each grid cell. | |
| void | exportGtheta (const char *filename) |
| Export to file the G(theta) value within each grid cell. Lines of the file correspond to each grid cell. | |
| void | exportLeafAreaUncertainty (const char *filename) |
| Export to file the per-voxel leaf-area inversion sampling uncertainty. Lines of the file correspond to each grid cell. | |
| void | exportPointCloud (const char *filename, bool write_header=true) |
| Export to file all points in the point cloud to an ASCII text file following the column format specified by the <ASCII_format></ASCII_format> tag in the scan XML file. | |
| void | exportPointCloud (const char *filename, uint scanID, bool write_header=true) |
| Export to file all points from a given scan to an ASCII text file following the column format specified by the <ASCII_format></ASCII_format> tag in the scan XML file. | |
| void | exportPointCloudPTX (const char *filename, uint scanID) |
| Export to file all points from a given scan to PTX file. | |
| void | exportScans (const char *filename) |
| Export all scans in the point cloud to an XML metadata file plus one ASCII data file per scan. | |
| void | addHitsToVisualizer (Visualizer *visualizer, uint pointsize) const |
| Add all hit points to the visualizer plug-in, and color them by their r-g-b color. | |
| void | addHitsToVisualizer (Visualizer *visualizer, uint pointsize, const helios::RGBcolor &point_color) const |
| Add all hit points to the visualizer plug-in, and color them by a specified r-g-b color. | |
| void | addHitsToVisualizer (Visualizer *visualizer, uint pointsize, const char *color_value) const |
| Add all hit points to the visualizer plug-in, and color them by a hit scalar data value. | |
| void | addGridToVisualizer (Visualizer *visualizer) const |
| Add all grid cells to the visualizer plug-in. | |
| void | addGridWireFrametoVisualizer (Visualizer *visualizer, float linewidth_pixels=1.0f) const |
| Add wire frame of the grid to the visualizer plug-in. | |
| void | addGrid (const helios::vec3 ¢er, const helios::vec3 &size, const helios::int3 &ndiv, float rotation) |
| Add a grid to point cloud instead of reading in from an xml file. | |
| void | addTrianglesToVisualizer (Visualizer *visualizer) const |
| Add all triangles to the visualizer plug-in, and color them by their r-g-b color. | |
| void | addTrianglesToVisualizer (Visualizer *visualizer, uint gridcell) const |
| Add triangles within a given grid cell to the visualizer plug-in, and color them by their r-g-b color. | |
| void | addLeafReconstructionToVisualizer (Visualizer *visualizer) const |
| Add reconstructed leaves (triangles or alpha masks) to the visualizer plug-in. | |
| void | addTrunkReconstructionToVisualizer (Visualizer *visualizer) const |
| Add trunk reconstruction to the visualizer plug-in. Colors reconstructed triangles by hit point color. | |
| void | addTrunkReconstructionToVisualizer (Visualizer *visualizer, const helios::RGBcolor &trunk_color) const |
| Add trunk reconstruction to the visualizer plug-in. | |
| std::vector< uint > | addLeafReconstructionToContext (helios::Context *context) const |
| Add reconstructed leaves (texture-masked patches) to the Context. | |
| std::vector< uint > | addLeafReconstructionToContext (helios::Context *context, const helios::int2 &subpatches) const |
| Add reconstructed leaves (texture-masked patches) to the Context with leaves divided into sub-patches (tiled) | |
| std::vector< uint > | addReconstructedTriangleGroupsToContext (helios::Context *context) const |
| Add triangle groups used in the direct reconstruction to the Context. | |
| std::vector< uint > | addTrunkReconstructionToContext (helios::Context *context) const |
| Add reconstructed trunk triangles to the Context. | |
| void | getHitBoundingBox (helios::vec3 &boxmin, helios::vec3 &boxmax) const |
| Form an axis-aligned bounding box for all hit points in the point cloud. | |
| void | getGridBoundingBox (helios::vec3 &boxmin, helios::vec3 &boxmax) const |
| Form an axis-aligned bounding box for all grid cells in the point cloud. | |
| void | distanceFilter (float maxdistance) |
| Filter scan by imposing a maximum distance from the scanner. | |
| void | xyzFilter (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax) |
| overloaded version of xyzFilter that defaults to deleting points outside the provided bounding box | |
| void | xyzFilter (float xmin, float xmax, float ymin, float ymax, float zmin, float zmax, bool deleteOutside) |
| Filter scan with a bounding box. | |
| void | reflectanceFilter (float minreflectance) |
| Filter scan by imposing a minimum reflectance value. | |
| void | scalarFilter (const char *scalar_field, float threshold, const char *comparator) |
| Filter hit points based on a scalar field given by a column in the ASCII data. | |
| void | maxPulseFilter (const char *scalar) |
| Filter multi-return data according to the maximum scalar value along each pulse. Any scalar value can be used, provided it is a field in the hit point data file. The resulting point cloud will have only one hit point per laser pulse. | |
| void | minPulseFilter (const char *scalar) |
| Filter multi-return data according to the minimum scalar value along each pulse. Any scalar value can be used, provided it is a field in the hit point data file. The resulting point cloud will have only one hit point per laser pulse. | |
| void | firstHitFilter () |
| Filter multi-return data to include only the first hit per laser pulse. The resulting point cloud will have only one hit point per laser pulse (first hits). | |
| void | lastHitFilter () |
| Filter multi-return data to include only the last hit per laser pulse. The resulting point cloud will have only one hit point per laser pulse (last hits). | |
| void | triangulateHitPoints (float Lmax, float max_aspect_ratio) |
| Perform triangulation on all hit points in point cloud. | |
| void | triangulateHitPoints (float Lmax, float max_aspect_ratio, const char *scalar_field, float threshold, const char *comparator) |
| Perform triangulation on hit points in point cloud that meet some filtering criteria based on scalar data. | |
| void | setExternalTriangulation (const std::vector< helios::vec3 > &triangle_vertices, const std::vector< int > &scanIDs) |
| Replace the internal triangulation with an externally-supplied world-space mesh. | |
| void | addTrianglesToContext (helios::Context *context) const |
| Add triangle geometry to Helios context. | |
| uint | getGridCellCount () const |
| Get the number of cells in the grid. | |
| void | addGridCell (const helios::vec3 ¢er, const helios::vec3 &size, float rotation) |
| Add a cell to the grid. | |
| void | addGridCell (const helios::vec3 ¢er, const helios::vec3 &global_anchor, const helios::vec3 &size, const helios::vec3 &global_size, float rotation, const helios::int3 &global_ijk, const helios::int3 &global_count) |
| Add a cell to the grid, where the cell is part of a larger global rectangular grid. | |
| helios::vec3 | getCellCenter (uint index) const |
| Get the (x,y,z) coordinate of a grid cell by its index. | |
| helios::vec3 | getCellGlobalAnchor (uint index) const |
| Get the (x,y,z) coordinate of a grid global anchor by its index. | |
| helios::vec3 | getCellSize (uint index) const |
| Get the size of a grid cell by its index. | |
| float | getCellRotation (uint index) const |
| Get the rotation angle of a grid cell about the z-axis by its index. | |
| void | syntheticScan (helios::Context *context) |
| Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse. | |
| void | syntheticScan (helios::Context *context, bool append) |
| Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse. | |
| void | syntheticScan (helios::Context *context, bool scan_grid_only, bool record_misses) |
| Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse. | |
| void | syntheticScan (helios::Context *context, bool scan_grid_only, bool record_misses, bool append) |
| Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse. | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold) |
| Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse. | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold, bool append) |
| Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse. | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold, bool scan_grid_only, bool record_misses) |
| Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse. | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold, bool scan_grid_only, bool record_misses, bool append) |
| Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse. | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold, ReturnMode return_mode, bool scan_grid_only=false, bool record_misses=false, bool append=true) |
| Run a synthetic LiDAR scan with an explicit return-reporting mode (analytic-waveform processing) | |
| void | setSyntheticScanMemoryBudget (size_t bytes) |
| Set the soft memory budget (in bytes) for the transient ray-tracing buffers used during syntheticScan. | |
| size_t | getSyntheticScanMemoryBudget () const |
| Get the soft memory budget (in bytes) for the transient ray-tracing buffers used during syntheticScan. | |
| std::vector< float > | calculateSyntheticLeafArea (helios::Context *context) |
| Calculate the surface area of all primitives in the context. | |
| std::vector< float > | calculateSyntheticGtheta (helios::Context *context) |
| Calculate the G(theta) of all primitives in the context. | |
| void | setCellLeafArea (float area, uint index) |
| Set the leaf area of a grid cell in m^2. | |
| float | getCellLeafArea (uint index) const |
| Get the leaf area of a grid cell in m^2. | |
| float | getCellLeafAreaDensity (uint index) const |
| Get the leaf area density of a grid cell in 1/m. | |
| void | setCellGtheta (float Gtheta, uint index) |
| Set the average G(theta) value of a grid cell. | |
| float | getCellGtheta (uint index) const |
| Get the G(theta) of a grid cell. | |
| int | getCellBeamCount (uint index) const |
| Get the number of beams that entered a grid cell during the leaf-area inversion. | |
| float | getCellRelativeDensityIndex (uint index) const |
| Get the relative density index of a grid cell. | |
| float | getCellMeanPathLength (uint index) const |
| Get the mean beam path length through a grid cell in meters. | |
| float | getCellLADVariance (uint index) const |
| Get the sampling variance of leaf area density for a grid cell. | |
| bool | getCellLeafAreaConfidenceInterval (uint index, float confidence_level, float &lower, float &upper) const |
| Get the single-voxel sampling confidence interval on leaf area. | |
| bool | getGroupLADConfidenceInterval (const std::vector< uint > &indices, float confidence_level, float &mean_lad, float &lower, float &upper) const |
| Get the group-scale sampling confidence interval on mean leaf area density - the recommended path. | |
| std::vector< helios::vec3 > | gapfillMisses () |
| For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points for all scans. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for. | |
| std::vector< helios::vec3 > | gapfillMisses (uint scanID) |
| For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for. | |
| std::vector< helios::vec3 > | gapfillMisses (uint scanID, const bool gapfill_grid_only, const bool add_flags) |
| For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for. | |
| void | forceBruteForceLeafArea (bool force) |
| Test/diagnostic hook: force the leaf-area inversion to use the brute-force per-cell slab loop. | |
| void | calculateLeafArea (helios::Context *context) |
| Calculate the leaf area for each grid volume. | |
| void | calculateLeafArea (helios::Context *context, int min_voxel_hits) |
| Calculate the leaf area for each grid volume. | |
| void | calculateLeafArea (helios::Context *context, int min_voxel_hits, float element_width) |
| Calculate the leaf area for each grid volume, with element size for uncertainty estimation. | |
| void | calculateLeafArea (helios::Context *context, float Gtheta, int min_voxel_hits, float element_width) |
| Calculate the leaf area for each grid volume using a caller-supplied G(theta), without requiring triangulation. | |
| void | calculateLeafAreaGPU (helios::Context *context) |
| Calculate the leaf area for each grid volume (DEPRECATED - use calculateLeafArea) | |
| void | calculateLeafAreaGPU (helios::Context *context, int min_voxel_hits) |
| Calculate the leaf area for each grid volume (DEPRECATED - use calculateLeafArea) | |
| void | enableGPUAcceleration () |
| Enable GPU acceleration in CollisionDetection plugin. | |
| void | disableGPUAcceleration () |
| Disable GPU acceleration in CollisionDetection plugin (use CPU/OpenMP only) | |
| bool | isGPUAvailable () const |
| Check whether a CUDA-capable GPU is available for acceleration. | |
| bool | isGPUAccelerationEnabled () const |
| Check whether GPU acceleration is currently enabled. | |
| void | calculateHitGridCell () |
| Determine which grid cell each hit point resides in. | |
| void | leafReconstructionAlphaMask (float minimum_leaf_group_area, float maximum_leaf_group_area, float leaf_aspect_ratio, const char *mask_file) |
| Perform a leaf reconstruction based on texture-masked Patches within each gridcell. The reconstruction produces Patches for each reconstructed leaf surface, with leaf size automatically estimated algorithmically. | |
| void | leafReconstructionAlphaMask (float minimum_leaf_group_area, float maximum_leaf_group_area, float leaf_aspect_ratio, float leaf_length_constant, const char *mask_file) |
| Perform a leaf reconstruction based on texture-masked Patches within each gridcell. The reconstruction produces Patches for each reconstructed leaf surface, with leaf size set to a constant value. | |
| void | trunkReconstruction (const helios::vec3 &box_center, const helios::vec3 &box_size, float Lmax, float max_aspect_ratio) |
| std::vector< uint > | loadTreeQSM (helios::Context *context, const std::string &filename, uint radial_subdivisions, const std::string &texture_file="") |
| Read a TreeQSM cylinder file and add tube objects to the context for each branch. | |
| std::vector< uint > | loadTreeQSMColormap (helios::Context *context, const std::string &filename, uint radial_subdivisions, const std::string &colormap_name) |
| Read a TreeQSM cylinder file and add tube objects to the context for each branch with colormap-based coloring. | |
| void | cropBeamsToGridAngleRange (uint source) |
| Delete hitpoints that do not pass through / intersect the voxel grid. | |
| std::vector< uint > | peakFinder (std::vector< float > signal) |
| find the indices of the peaks of a vector of floats | |
Static Public Member Functions | |
| static int | selfTest (int argc=0, char **argv=nullptr) |
| Self-test (unit test) function. | |
| static float | applyRangeIntensityCorrection (float intensity, float distance) |
| Normalize a synthetic return intensity for range. | |
Static Public Attributes | |
| static constexpr float | LIDAR_MISS_DISTANCE = 20000.f |
| Distance (m) at which a "miss" point is placed along its beam direction. | |
| static constexpr float | LIDAR_RAYTRACE_MISS_T = 1001.f |
| Ray-tracer "no hit" parameter (m): the maximum ray length passed to the backend. | |
| LiDARcloud::~LiDARcloud | ( | void | ) |
| void LiDARcloud::addGrid | ( | const helios::vec3 & | center, |
| const helios::vec3 & | size, | ||
| const helios::int3 & | ndiv, | ||
| float | rotation | ||
| ) |
| void LiDARcloud::addGridCell | ( | const helios::vec3 & | center, |
| const helios::vec3 & | global_anchor, | ||
| const helios::vec3 & | size, | ||
| const helios::vec3 & | global_size, | ||
| float | rotation, | ||
| const helios::int3 & | global_ijk, | ||
| const helios::int3 & | global_count | ||
| ) |
Add a cell to the grid, where the cell is part of a larger global rectangular grid.
| [in] | center | (x,y,z) coordinate of grid center |
| [in] | global_anchor | (x,y,z) coordinate of grid global anchor, i.e., this is the 'center' coordinate entered in the xml file. If grid Nx=Ny=Nz=1, global_anchor=center |
| [in] | size | size of the grid cell in the x,y,z directions |
| [in] | global_size | size of the global grid in the x,y,z directions |
| [in] | rotation | rotation angle (in radians) of the grid cell about the z-axis |
| [in] | global_ijk | index within the global grid in the x,y,z directions |
| [in] | global_count | total number of cells in global grid in the x,y,z directions |
| void LiDARcloud::addGridCell | ( | const helios::vec3 & | center, |
| const helios::vec3 & | size, | ||
| float | rotation | ||
| ) |
| void LiDARcloud::addGridToVisualizer | ( | Visualizer * | visualizer | ) | const |
| void LiDARcloud::addGridWireFrametoVisualizer | ( | Visualizer * | visualizer, |
| float | linewidth_pixels = 1.0f |
||
| ) | const |
| void LiDARcloud::addHitPoint | ( | uint | scanID, |
| const helios::vec3 & | xyz, | ||
| const helios::int2 & | row_column, | ||
| const helios::RGBcolor & | color, | ||
| const std::map< std::string, double > & | data | ||
| ) |
Specify a scan point as a hit by providing the (x,y,z) coordinates and row,column in scan table.
| [in] | scanID | ID of scan hit point to which hit point should be added. |
| [in] | xyz | (x,y,z) coordinates of hit point. |
| [in] | row_column | row (theta index) and column (phi index) for point in scan table |
| [in] | color | r-g-b color of the hit point |
| [in] | data | Map data structure containing floating point data values for the hit point. E.g., "reflectance" could be mapped to a value of 965.2. |
| void LiDARcloud::addHitPoint | ( | uint | scanID, |
| const helios::vec3 & | xyz, | ||
| const helios::SphericalCoord & | direction | ||
| ) |
Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction.
| [in] | scanID | ID of scan hit point to which hit point should be added. |
| [in] | xyz | (x,y,z) coordinates of hit point. |
| [in] | direction | Spherical coordinate corresponding to the scanner ray direction for the hit point. |
| void LiDARcloud::addHitPoint | ( | uint | scanID, |
| const helios::vec3 & | xyz, | ||
| const helios::SphericalCoord & | direction, | ||
| const helios::RGBcolor & | color | ||
| ) |
Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction.
| [in] | scanID | ID of scan hit point to which hit point should be added. |
| [in] | xyz | (x,y,z) coordinates of hit point. |
| [in] | direction | Spherical coordinate corresponding to the scanner ray direction for the hit point. |
| [in] | color | r-g-b color of the hit point |
| void LiDARcloud::addHitPoint | ( | uint | scanID, |
| const helios::vec3 & | xyz, | ||
| const helios::SphericalCoord & | direction, | ||
| const helios::RGBcolor & | color, | ||
| const std::map< std::string, double > & | data | ||
| ) |
Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction.
| [in] | scanID | ID of scan hit point to which hit point should be added. |
| [in] | xyz | (x,y,z) coordinates of hit point. |
| [in] | direction | Spherical coordinate corresponding to the scanner ray direction for the hit point. |
| [in] | color | r-g-b color of the hit point |
| [in] | data | Map data structure containing floating point data values for the hit point. E.g., "reflectance" could be mapped to a value of 965.2. |
| void LiDARcloud::addHitPoint | ( | uint | scanID, |
| const helios::vec3 & | xyz, | ||
| const helios::SphericalCoord & | direction, | ||
| const std::map< std::string, double > & | data | ||
| ) |
Specify a scan point as a hit by providing the (x,y,z) coordinates and scan ray direction.
| [in] | scanID | ID of scan hit point to which hit point should be added. |
| [in] | xyz | (x,y,z) coordinates of hit point. |
| [in] | direction | Spherical coordinate corresponding to the scanner ray direction for the hit point. |
| [in] | data | Map data structure containing floating point data values for the hit point. E.g., "reflectance" could be mapped to a value of 965.2. |
| void LiDARcloud::addHitsToVisualizer | ( | Visualizer * | visualizer, |
| uint | pointsize | ||
| ) | const |
| void LiDARcloud::addHitsToVisualizer | ( | Visualizer * | visualizer, |
| uint | pointsize, | ||
| const char * | color_value | ||
| ) | const |
Add all hit points to the visualizer plug-in, and color them by a hit scalar data value.
| [in] | visualizer | Pointer to the Visualizer plugin object. |
| [in] | pointsize | Size of scan point in font points. |
| [in] | color_value | Label for scalar hit data value to be used for coloring the points based on a pseudocolor mapping (e.g., "reflectance"). If the label does not exist, the function will print a warning and use the default color. |
| void LiDARcloud::addHitsToVisualizer | ( | Visualizer * | visualizer, |
| uint | pointsize, | ||
| const helios::RGBcolor & | point_color | ||
| ) | const |
| std::vector< uint > LiDARcloud::addLeafReconstructionToContext | ( | helios::Context * | context | ) | const |
Add reconstructed leaves (texture-masked patches) to the Context.
| [in] | context | Pointer to the Helios context |
| std::vector< uint > LiDARcloud::addLeafReconstructionToContext | ( | helios::Context * | context, |
| const helios::int2 & | subpatches | ||
| ) | const |
Add reconstructed leaves (texture-masked patches) to the Context with leaves divided into sub-patches (tiled)
| [in] | context | Pointer to the Helios context |
| [in] | subpatches | Number of leaf sub-patches (tiles) in the x- and y- directions. |
| void LiDARcloud::addLeafReconstructionToVisualizer | ( | Visualizer * | visualizer | ) | const |
| std::vector< uint > LiDARcloud::addReconstructedTriangleGroupsToContext | ( | helios::Context * | context | ) | const |
Add triangle groups used in the direct reconstruction to the Context.
| [in] | context | Pointer to the Helios context. |
| uint LiDARcloud::addScan | ( | ScanMetadata & | newscan | ) |
| uint LiDARcloud::addScanMoving | ( | ScanMetadata | scan, |
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec3 > & | traj_rpy, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | pulse_rate_hz, | ||
| double | t0 = 0.0 |
||
| ) |
Add a moving-platform (mobile/airborne) LiDAR scan with the orientation trajectory given as Euler angles.
Convenience overload of addScanMoving() that takes the per-sample platform orientation as roll/pitch/yaw Euler angles (radians) instead of quaternions. Each traj_rpy entry is converted to a Hamilton body->world quaternion using the same intrinsic Z-Y-X (yaw-pitch-roll) convention as boresight_rpy, then the scan is registered exactly as the quaternion overload. Use this when hand-authoring a trajectory; prefer the quaternion overload when the trajectory comes from an INS/IMU that natively reports quaternions (avoids a round-trip through Euler angles and the associated gimbal-lock ambiguity).
| [in] | scan | Scan metadata defining the angular sampling grid and beam parameters (origin is ignored; the trajectory supplies position). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_rpy | Platform orientations as roll/pitch/yaw Euler angles in radians (intrinsic Z-Y-X), one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | pulse_rate_hz | Pulse repetition rate in Hz (must be > 0); sets the time between consecutive pulses. |
| [in] | t0 | Time of the first pulse in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanMoving | ( | ScanMetadata | scan, |
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec4 > & | traj_quat, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | pulse_rate_hz, | ||
| double | t0 = 0.0 |
||
| ) |
Add a moving-platform (mobile/airborne) LiDAR scan driven by a 6-DOF pose trajectory.
Registers a scan whose scanner pose changes during the sweep. The synthetic scan generator (see syntheticScan()) computes, for each pulse, its acquisition time \(t = t_0 + \mathrm{ordinal}\cdot
\mathrm{pulse\_period}\) (where pulse_period = 1/pulse_rate_hz and the ordinal is the pulse's position in the scan-grid firing sequence), interpolates the platform pose at that time via ScanMetadata::poseAt(), and emits a per-pulse origin \(\mathbf{o} = \mathbf{pos} + R(\mathbf{q})\,\mathbf{lever\_arm}\) and direction \(\mathbf{d} = R(\mathbf{q})\,R(\mathbf{boresight})\,\mathbf{d}_{body}\). Every resulting hit and miss stores its own origin (data labels "origin_x"/"origin_y"/"origin_z"), real timestamp ("timestamp"), and firing index ("pulse_id"). The static ScanMetadata::scanTilt_roll / scanTilt_pitch / scanTilt_azimuth fields are not applied in this mode and must be zero (attitude is defined entirely by traj_quat and boresight_rpy).
| [in] | scan | Scan metadata defining the angular sampling grid and beam parameters (origin is ignored; the trajectory supplies position). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_quat | Platform orientation quaternions (qx,qy,qz,qw), Hamilton body->world, one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | pulse_rate_hz | Pulse repetition rate in Hz (must be > 0); sets the time between consecutive pulses. |
| [in] | t0 | Time of the first pulse in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanMovingRaster | ( | uint | Ntheta, |
| float | thetaMin, | ||
| float | thetaMax, | ||
| uint | Nphi, | ||
| float | phiMin, | ||
| float | phiMax, | ||
| float | pulse_rate_hz, | ||
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec4 > & | traj_quat, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | exitDiameter, | ||
| float | beamDivergence, | ||
| float | rangeNoiseStdDev, | ||
| float | angleNoiseStdDev, | ||
| const std::vector< std::string > & | columnFormat = {"x", "y", "z"}, |
||
| double | t0 = 0.0 |
||
| ) |
Add a moving-platform raster scan: a fixed uniform angular fan swept while the platform moves along a trajectory.
Convenience wrapper around addScanMoving() for a non-spinning sensor on a moving platform. The caller specifies the per-frame angular fan resolution (Ntheta x Nphi over [thetaMin,thetaMax] x [phiMin,phiMax]) plus the trajectory and PRF, and Helios derives the per-pulse time sampling along the trajectory (t = t0 + ordinal/pulse_rate_hz). Unlike the low-level addScanMoving(), the caller does not pre-build a Scan metadata or compute pulse counts to make the sweep span the flight. Sets the scan's ScanMode to SCAN_MODE_MOVING_RASTER.
| [in] | Ntheta | Number of zenith samples in the angular fan. |
| [in] | thetaMin | Minimum zenith angle in radians. |
| [in] | thetaMax | Maximum zenith angle in radians. |
| [in] | Nphi | Number of azimuth samples in the angular fan. |
| [in] | phiMin | Minimum azimuth angle in radians. |
| [in] | phiMax | Maximum azimuth angle in radians. |
| [in] | pulse_rate_hz | Pulse repetition rate (PRF) in Hz (must be > 0). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_quat | Platform orientation quaternions (qx,qy,qz,qw), Hamilton body->world, one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | exitDiameter | Diameter of the laser pulse at exit from the scanner in meters. |
| [in] | beamDivergence | Divergence angle of the laser beam in radians. |
| [in] | rangeNoiseStdDev | Standard deviation of Gaussian range (along-beam) measurement noise in meters (0 disables). |
| [in] | angleNoiseStdDev | Standard deviation of Gaussian angular (beam-pointing) jitter in radians (0 disables). |
| [in] | columnFormat | Vector of strings specifying the columns of the scan ASCII file for input/output. |
| [in] | t0 | Time of the first pulse (pulse ordinal 0) in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanRisley | ( | const std::vector< RisleyPrism > & | prisms, |
| double | refractive_index_air, | ||
| float | pulse_rate_hz, | ||
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec3 > & | traj_rpy, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | exitDiameter, | ||
| float | beamDivergence, | ||
| float | rangeNoiseStdDev, | ||
| float | angleNoiseStdDev, | ||
| const std::vector< std::string > & | columnFormat = {"x", "y", "z"}, |
||
| double | t0 = 0.0 |
||
| ) |
Add a rotating-Risley-prism (Livox-style rosette) scan with the orientation trajectory given as Euler angles.
Convenience overload of addScanRisley() that takes the per-sample platform orientation as roll/pitch/yaw Euler angles (radians, intrinsic Z-Y-X) instead of quaternions; it converts each to a quaternion and delegates to the quaternion overload.
| [in] | prisms | Rotating wedge prisms in the order the beam passes through them (see RisleyPrism). |
| [in] | refractive_index_air | Refractive index of the medium surrounding the prisms (typically 1.0 for air). |
| [in] | pulse_rate_hz | Pulse repetition rate (PRF) in Hz (must be > 0). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_rpy | Platform orientations as roll/pitch/yaw Euler angles in radians, one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | exitDiameter | Diameter of the laser pulse at exit from the scanner in meters. |
| [in] | beamDivergence | Divergence angle of the laser beam in radians. |
| [in] | rangeNoiseStdDev | Standard deviation of Gaussian range (along-beam) measurement noise in meters (0 disables). |
| [in] | angleNoiseStdDev | Standard deviation of Gaussian angular (beam-pointing) jitter in radians (0 disables). |
| [in] | columnFormat | Vector of strings specifying the columns of the scan ASCII file for input/output. |
| [in] | t0 | Time of the first pulse (pulse ordinal 0) in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanRisley | ( | const std::vector< RisleyPrism > & | prisms, |
| double | refractive_index_air, | ||
| float | pulse_rate_hz, | ||
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec4 > & | traj_quat, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | exitDiameter, | ||
| float | beamDivergence, | ||
| float | rangeNoiseStdDev, | ||
| float | angleNoiseStdDev, | ||
| const std::vector< std::string > & | columnFormat = {"x", "y", "z"}, |
||
| double | t0 = 0.0 |
||
| ) |
Add a rotating-Risley-prism (Livox-style rosette) scan from physical instrument parameters.
Sets up a non-repetitive rosette scan produced by a stack of continuously rotating wedge prisms (the optical mechanism used by Livox rosette-pattern sensors such as the Mid-40, Mid-70, and Avia). Each pulse fires a single beam that is refracted through the rotating prisms; with the prisms rotating at different (and generally incommensurate) rates the beam traces a non-repetitive pattern that fills a circular field of view, denser toward the center. The body-frame beam direction of each pulse is computed by full Snell's-law refraction through the prisms at that pulse's time, then composed with the boresight and platform-trajectory orientation exactly as in addScanMoving(). The scan is stored as an Ntheta=1, Nphi=Npulses table (one direction per pulse), where Npulses = round(pulse_rate_hz * trajectory_duration). The ScanPattern is set to SCAN_PATTERN_RISLEY_PRISM and the ScanMode to SCAN_MODE_RISLEY_PRISM.
Like a spinning scan, a Risley-prism scan is always trajectory-driven. A stationary capture (e.g. on a tripod) is expressed as a trajectory of two coincident poses with the same position and orientation, separated in time by the desired acquisition duration; the duration determines how many pulses (and how much of the rosette) are collected.
| [in] | prisms | Rotating wedge prisms in the order the beam passes through them (see RisleyPrism). At least one is required; a Livox sensor uses two counter-rotating prisms. |
| [in] | refractive_index_air | Refractive index of the medium surrounding the prisms (typically 1.0 for air). |
| [in] | pulse_rate_hz | Pulse repetition rate (PRF) in Hz (must be > 0). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_quat | Platform orientation quaternions (qx,qy,qz,qw), Hamilton body->world, one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | exitDiameter | Diameter of the laser pulse at exit from the scanner in meters. |
| [in] | beamDivergence | Divergence angle of the laser beam in radians. |
| [in] | rangeNoiseStdDev | Standard deviation of Gaussian range (along-beam) measurement noise in meters (0 disables). |
| [in] | angleNoiseStdDev | Standard deviation of Gaussian angular (beam-pointing) jitter in radians (0 disables). |
| [in] | columnFormat | Vector of strings specifying the columns of the scan ASCII file for input/output. |
| [in] | t0 | Time of the first pulse (pulse ordinal 0) in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanSpinning | ( | const std::vector< float > & | beamElevationAngles, |
| float | azimuthStep_rad, | ||
| float | pulse_rate_hz, | ||
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec3 > & | traj_rpy, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | exitDiameter, | ||
| float | beamDivergence, | ||
| float | rangeNoiseStdDev, | ||
| float | angleNoiseStdDev, | ||
| const std::vector< std::string > & | columnFormat = {"x", "y", "z"}, |
||
| double | t0 = 0.0 |
||
| ) |
Add a continuously-spinning multibeam scan with the orientation trajectory given as Euler angles.
Convenience overload of addScanSpinning() that takes the per-sample platform orientation as roll/pitch/yaw Euler angles (radians, intrinsic Z-Y-X) instead of quaternions. Each traj_rpy entry is converted to a Hamilton body->world quaternion, then the scan is registered exactly as the quaternion overload.
| [in] | beamElevationAngles | Per-channel beam elevation angles above the horizon, in radians. |
| [in] | azimuthStep_rad | Azimuth angular resolution in radians per firing step. Must be > 0. |
| [in] | pulse_rate_hz | Pulse repetition rate (PRF) in Hz (must be > 0). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_rpy | Platform orientations as roll/pitch/yaw Euler angles in radians (intrinsic Z-Y-X), one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | exitDiameter | Diameter of the laser pulse at exit from the scanner in meters. |
| [in] | beamDivergence | Divergence angle of the laser beam in radians. |
| [in] | rangeNoiseStdDev | Standard deviation of Gaussian range (along-beam) measurement noise in meters (0 disables). |
| [in] | angleNoiseStdDev | Standard deviation of Gaussian angular (beam-pointing) jitter in radians (0 disables). |
| [in] | columnFormat | Vector of strings specifying the columns of the scan ASCII file for input/output. |
| [in] | t0 | Time of the first pulse (pulse ordinal 0) in seconds (relative time; defaults to 0). |
| uint LiDARcloud::addScanSpinning | ( | const std::vector< float > & | beamElevationAngles, |
| float | azimuthStep_rad, | ||
| float | pulse_rate_hz, | ||
| const std::vector< double > & | traj_t, | ||
| const std::vector< helios::vec3 > & | traj_pos, | ||
| const std::vector< helios::vec4 > & | traj_quat, | ||
| const helios::vec3 & | lever_arm, | ||
| const helios::vec3 & | boresight_rpy, | ||
| float | exitDiameter, | ||
| float | beamDivergence, | ||
| float | rangeNoiseStdDev, | ||
| float | angleNoiseStdDev, | ||
| const std::vector< std::string > & | columnFormat = {"x", "y", "z"}, |
||
| double | t0 = 0.0 |
||
| ) |
Add a continuously-spinning multibeam (Velodyne/Ouster/Hesai-style) scan driven by a 6-DOF platform trajectory.
Sets up a rotating multi-channel sensor from its physical instrument parameters; Helios derives the internal sampling grid, rotation rate, and revolution count rather than requiring the caller to hand-flatten them into an Ntheta x Nphi grid. A spinning sensor rotates continuously through 360 degrees while the platform moves along the trajectory, so there is no partial-arc azimuth range: the only azimuth control is the angular resolution (azimuthStep_rad). The number of points is dictated by the pulse repetition rate and the total trajectory duration: n_pulses = pulse_rate_hz * (traj_t.back() - traj_t.front()), distributed across the channels and the derived number of azimuth steps.
From the physical parameters Helios derives: steps_per_rev = round(2*pi / azimuthStep_rad); rotation_rate = pulse_rate_hz / (channels * steps_per_rev); n_revolutions = rotation_rate * duration; Nphi = round(steps_per_rev * n_revolutions); Ntheta = number of channels. The per-pulse timestamp, origin, and orientation are produced exactly as in addScanMoving(), and each pulse fires at the EXACT per-channel elevation (not a resampled uniform grid).
| [in] | beamElevationAngles | Per-channel beam elevation angles above the horizon, in radians (zenith = pi/2 - elevation). Its size sets the channel count. |
| [in] | azimuthStep_rad | Azimuth angular resolution in radians per firing step (e.g. 0.2 degrees = 0.2*pi/180). Must be > 0. |
| [in] | pulse_rate_hz | Pulse repetition rate (PRF) in Hz (must be > 0). |
| [in] | traj_t | Monotonically increasing trajectory sample times in seconds (size M). |
| [in] | traj_pos | Platform positions in world coordinates, one per traj_t entry (size M). |
| [in] | traj_quat | Platform orientation quaternions (qx,qy,qz,qw), Hamilton body->world, one per traj_t entry (size M). |
| [in] | lever_arm | Sensor optical center in the platform body frame (meters). |
| [in] | boresight_rpy | Fixed sensor rotational misalignment as roll/pitch/yaw in radians (body frame). |
| [in] | exitDiameter | Diameter of the laser pulse at exit from the scanner in meters. |
| [in] | beamDivergence | Divergence angle of the laser beam in radians. |
| [in] | rangeNoiseStdDev | Standard deviation of Gaussian range (along-beam) measurement noise in meters (0 disables). |
| [in] | angleNoiseStdDev | Standard deviation of Gaussian angular (beam-pointing) jitter in radians (0 disables). |
| [in] | columnFormat | Vector of strings specifying the columns of the scan ASCII file for input/output. |
| [in] | t0 | Time of the first pulse (pulse ordinal 0) in seconds (relative time; defaults to 0). |
| void LiDARcloud::addTrianglesToContext | ( | helios::Context * | context | ) | const |
| void LiDARcloud::addTrianglesToVisualizer | ( | Visualizer * | visualizer | ) | const |
| void LiDARcloud::addTrianglesToVisualizer | ( | Visualizer * | visualizer, |
| uint | gridcell | ||
| ) | const |
| std::vector< uint > LiDARcloud::addTrunkReconstructionToContext | ( | helios::Context * | context | ) | const |
| void LiDARcloud::addTrunkReconstructionToVisualizer | ( | Visualizer * | visualizer | ) | const |
| void LiDARcloud::addTrunkReconstructionToVisualizer | ( | Visualizer * | visualizer, |
| const helios::RGBcolor & | trunk_color | ||
| ) | const |
|
static |
Normalize a synthetic return intensity for range.
Helios reports range-normalized intensity: the range-independent return amplitude \(\rho\,\cos\theta\) (per-primitive reflectivity times the incidence-angle cosine), as if the geometric \(1/R^2\) loss of the LiDAR range equation had been measured and then divided back out ( \((\rho\,\cos\theta/R^2)\cdot R^2 = \rho\,\cos\theta\)). Two identical surfaces at different ranges therefore return the same intensity. Because syntheticScan() generates intensity directly as \(\rho\,\cos\theta\) without ever applying the \(1/R^2\) loss, this normalization is the identity on the value; the helper exists to make the convention explicit and is the single place to change should the raw (range-dependent) convention be wanted instead. Partial-footprint attenuation of sub-footprint returns (in multi-return mode) is carried separately by the fraction of beam sub-rays that strike the target and is deliberately preserved, as it reflects a target property rather than a range-geometry loss.
| [in] | intensity | Return intensity ( \(\rho\,\cos\theta\)). |
| [in] | distance | Measured range from the scanner to the return, in meters (accepted for interface symmetry and future raw-mode use). |
| void LiDARcloud::calculateHitGridCell | ( | ) |
| void LiDARcloud::calculateLeafArea | ( | helios::Context * | context | ) |
Calculate the leaf area for each grid volume.
| [in] | context | Pointer to the Helios context |
| void LiDARcloud::calculateLeafArea | ( | helios::Context * | context, |
| float | Gtheta, | ||
| int | min_voxel_hits, | ||
| float | element_width | ||
| ) |
Calculate the leaf area for each grid volume using a caller-supplied G(theta), without requiring triangulation.
Beam-based leaf-area inversion for scans that cannot be triangulated - in particular moving-platform (mobile/airborne) scans (see addScanMoving()), whose pulses do not lie on a fixed theta-phi grid and so cannot be Delaunay-triangulated. Triangulation is normally required only to estimate the per-voxel mean leaf-projection coefficient G(theta); this overload takes G(theta) directly instead, so it does NOT require triangulateHitPoints() to have been called.
The inversion uses the per-pulse beam origin recorded on each hit (see getHitOrigin()) when classifying beams against voxels, so it is geometrically correct for a scanner that moved during acquisition. For a static scan the per-hit origin equals the scan origin, so this overload also works (with a supplied G(theta)) there.
| [in] | context | Pointer to the Helios context |
| [in] | Gtheta | Mean leaf-projection coefficient G(theta), applied to every voxel. Must be in (0,1]. Use 0.5 for a spherical (random) leaf-angle distribution; supply a measured/assumed value otherwise. |
| [in] | min_voxel_hits | Minimum number of allowable LiDAR hits per voxel |
| [in] | element_width | Characteristic vegetation element width [m]; see the three-argument overload. Pass <= 0 to report sampling-only uncertainty. |
| void LiDARcloud::calculateLeafArea | ( | helios::Context * | context, |
| int | min_voxel_hits | ||
| ) |
Calculate the leaf area for each grid volume.
| [in] | context | Pointer to the Helios context |
| [in] | min_voxel_hits | Minimum number of allowable LiDAR hits per voxel |
is_miss flag (see isHitMiss()). Handles single- and multi-return data with a unified beam-based equal-weighting algorithm. | void LiDARcloud::calculateLeafArea | ( | helios::Context * | context, |
| int | min_voxel_hits, | ||
| float | element_width | ||
| ) |
Calculate the leaf area for each grid volume, with element size for uncertainty estimation.
| [in] | context | Pointer to the Helios context |
| [in] | min_voxel_hits | Minimum number of allowable LiDAR hits per voxel |
| [in] | element_width | Characteristic vegetation element width [m] (e.g. mean leaf width), used by the per-voxel LAD sampling-uncertainty estimate (the element-position variance term; Pimont et al. 2018, Appendix A). Pass a value <= 0 to omit that term and report SAMPLING-ONLY uncertainty. The leaf-area point estimate is identical regardless of this argument. |
| void LiDARcloud::calculateLeafAreaGPU | ( | helios::Context * | context | ) |
Calculate the leaf area for each grid volume (DEPRECATED - use calculateLeafArea)
| [in] | context | Pointer to the Helios context |
| void LiDARcloud::calculateLeafAreaGPU | ( | helios::Context * | context, |
| int | min_voxel_hits | ||
| ) |
Calculate the leaf area for each grid volume (DEPRECATED - use calculateLeafArea)
| [in] | context | Pointer to the Helios context |
| [in] | min_voxel_hits | Minimum number of allowable LiDAR hits per voxel |
| std::vector< float > LiDARcloud::calculateSyntheticGtheta | ( | helios::Context * | context | ) |
| std::vector< float > LiDARcloud::calculateSyntheticLeafArea | ( | helios::Context * | context | ) |
| void LiDARcloud::coordinateRotation | ( | const helios::SphericalCoord & | rotation | ) |
| void LiDARcloud::coordinateRotation | ( | float | rotation, |
| const helios::vec3 & | line_base, | ||
| const helios::vec3 & | line_direction | ||
| ) |
Rotate all points in the point cloud about an arbitrary line.
| [in] | rotation | Rotation angle in radians |
| [in] | line_base | (x,y,z) coordinate of a point on the line about which points will be rotated |
| [in] | line_direction | Unit vector pointing in the direction of the line about which points will be rotated |
| void LiDARcloud::coordinateRotation | ( | uint | scanID, |
| const helios::SphericalCoord & | rotation | ||
| ) |
| void LiDARcloud::coordinateShift | ( | const helios::vec3 & | shift | ) |
| void LiDARcloud::coordinateShift | ( | uint | scanID, |
| const helios::vec3 & | shift | ||
| ) |
| void LiDARcloud::cropBeamsToGridAngleRange | ( | uint | source | ) |
| void LiDARcloud::deleteHitPoint | ( | uint | index | ) |
| void LiDARcloud::disableGPUAcceleration | ( | ) |
| void LiDARcloud::disableMessages | ( | ) |
| void LiDARcloud::distanceFilter | ( | float | maxdistance | ) |
| bool LiDARcloud::doesHitDataExist | ( | uint | index, |
| const char * | label | ||
| ) | const |
| void LiDARcloud::enableGPUAcceleration | ( | ) |
| void LiDARcloud::enableMessages | ( | ) |
| void LiDARcloud::exportGtheta | ( | const char * | filename | ) |
Export to file the G(theta) value within each grid cell. Lines of the file correspond to each grid cell.
| [in] | filename | Name of file |
Definition at line 1308 of file fileIO.cpp.
| void LiDARcloud::exportLeafAreaDensities | ( | const char * | filename | ) |
Export to file the leaf area density within each grid cell. Lines of the file correspond to each grid cell.
| [in] | filename | Name of file |
Definition at line 1288 of file fileIO.cpp.
| void LiDARcloud::exportLeafAreas | ( | const char * | filename | ) |
Export to file the leaf area within each grid cell. Lines of the file correspond to each grid cell.
| [in] | filename | Name of file |
Definition at line 1268 of file fileIO.cpp.
| void LiDARcloud::exportLeafAreaUncertainty | ( | const char * | filename | ) |
Export to file the per-voxel leaf-area inversion sampling uncertainty. Lines of the file correspond to each grid cell.
Columns: cell_index leaf_area beam_count I_rdi LAD_std_error ci_valid. The standard error column reports the SAMPLING standard error of LAD [1/m] (sqrt of the per-voxel variance); undefined values are written as the sentinel -1. This is statistical sampling uncertainty conditional on the beams that entered each voxel and does NOT capture occlusion/coverage bias.
| [in] | filename | Name of file |
Definition at line 1328 of file fileIO.cpp.
| void LiDARcloud::exportPointCloud | ( | const char * | filename, |
| bool | write_header = true |
||
| ) |
Export to file all points in the point cloud to an ASCII text file following the column format specified by the <ASCII_format></ASCII_format> tag in the scan XML file.
| [in] | filename | Name of file |
| [in] | write_header | [optional] If true (default), a leading comment line beginning with '#' that lists the column field names is written at the top of each file. The loader ignores '#' comment lines, so headered files round-trip through loadXML(). |
Definition at line 1353 of file fileIO.cpp.
| void LiDARcloud::exportPointCloud | ( | const char * | filename, |
| uint | scanID, | ||
| bool | write_header = true |
||
| ) |
Export to file all points from a given scan to an ASCII text file following the column format specified by the <ASCII_format></ASCII_format> tag in the scan XML file.
| [in] | filename | Name of file |
| [in] | scanID | Identifier of scan to be exported |
| [in] | write_header | [optional] If true (default), a leading comment line beginning with '#' that lists the column field names is written at the top of the file. The loader ignores '#' comment lines, so headered files round-trip through loadXML(). |
Definition at line 1379 of file fileIO.cpp.
| void LiDARcloud::exportPointCloudPTX | ( | const char * | filename, |
| uint | scanID | ||
| ) |
Export to file all points from a given scan to PTX file.
| [in] | filename | Name of file |
| [in] | scanID | Identifier of scan to be exported |
Definition at line 1744 of file fileIO.cpp.
| void LiDARcloud::exportScans | ( | const char * | filename | ) |
Export all scans in the point cloud to an XML metadata file plus one ASCII data file per scan.
| [in] | filename | Name of the XML metadata file to write (e.g. "output/scans.xml") |
filename and appending "_\<scanID>.xyz". For example, passing "output/scans.xml" with three scans produces "output/scans_0.xyz", "output/scans_1.xyz", and "output/scans_2.xyz" alongside the XML. The ASCII column format follows the per-scan <ASCII_format></ASCII_format> tag, and the XML output can be re-loaded with LiDARcloud::loadXML() when invoked from the same working directory used at export time. Definition at line 1527 of file fileIO.cpp.
| void LiDARcloud::exportTriangleAreas | ( | const char * | filename | ) |
Export to file the area of all triangles formed.
| [in] | filename | Name of file |
Definition at line 1091 of file fileIO.cpp.
| void LiDARcloud::exportTriangleAreas | ( | const char * | filename, |
| int | gridcell | ||
| ) |
Export to file the area of all triangles formed within a single grid cell.
| [in] | filename | Name of file |
| [in] | gridcell | Index of gridcell to get triangles from |
Definition at line 1113 of file fileIO.cpp.
| void LiDARcloud::exportTriangleAzimuthDistribution | ( | const char * | filename, |
| uint | Nbins | ||
| ) |
Export to file discrete azimuthal angle probability distribution based on the triangulation. Azimuthal angles are between 0 and 360 degrees. The probability distribution is normalized such that the integral over all angles is 1. The value of each bin is written as a column in the output file; lines correspond to each voxel grid cell.
| [in] | filename | Name of file |
| [in] | Nbins | Number of bins to use for the histogram |
Definition at line 1199 of file fileIO.cpp.
| void LiDARcloud::exportTriangleInclinationDistribution | ( | const char * | filename, |
| uint | Nbins | ||
| ) |
Export to file discrete area-weighted inclination angle probability distribution based on the triangulation. Inclination angles are between 0 and 90 degrees. The probability distribution is normalized such that the sine-weighted integral over all angles is 1. The value of each bin is written as a column in the output file; lines correspond to each voxel grid cell.
| [in] | filename | Name of file |
| [in] | Nbins | Number of bins to use for the histogram |
Definition at line 1138 of file fileIO.cpp.
| void LiDARcloud::exportTriangleNormals | ( | const char * | filename | ) |
Export to file the normal vectors (nx,ny,nz) for all triangles formed.
| [in] | filename | Name of file |
Definition at line 1030 of file fileIO.cpp.
| void LiDARcloud::exportTriangleNormals | ( | const char * | filename, |
| int | gridcell | ||
| ) |
Export to file the normal vectors (nx,ny,nz) for triangles formed within a single gridcell.
| [in] | filename | Name of file |
| [in] | gridcell | Index of gridcell to get triangles from |
Definition at line 1059 of file fileIO.cpp.
| void LiDARcloud::firstHitFilter | ( | ) |
Filter multi-return data to include only the first hit per laser pulse. The resulting point cloud will have only one hit point per laser pulse (first hits).
|
inline |
Test/diagnostic hook: force the leaf-area inversion to use the brute-force per-cell slab loop.
By default calculateLeafArea() uses a fast per-beam 3D-DDA traversal of the voxel lattice. When this is set true, the slower brute-force per-cell path is used instead (it produces identical results). This exists so the self-tests can verify the two paths agree; it is not needed in normal use.
| [in] | force | True to force the brute-force path, false (default) to use the fast DDA path when applicable. |
| std::vector< helios::vec3 > LiDARcloud::gapfillMisses | ( | ) |
For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points for all scans. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for.
| std::vector< helios::vec3 > LiDARcloud::gapfillMisses | ( | uint | scanID | ) |
For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for.
| [in] | scanID | ID of scan to gapfill |
| std::vector< helios::vec3 > LiDARcloud::gapfillMisses | ( | uint | scanID, |
| const bool | gapfill_grid_only, | ||
| const bool | add_flags | ||
| ) |
For scans that are missing points (e.g., sky points), this function will attempt to fill in missing points. This increases the accuracy of LAD calculations because it makes sure all pulses are accounted for.
| [in] | scanID | ID of scan to gapfill |
| [in] | gapfill_grid_only | if true, missing points are gapfilled only within the axis-aligned bounding box of the voxel grid. If false missing points are gap filled across the range of phi and theta values specified in the scan xml file. |
| [in] | add_flags | if true, gapfillMisses_code is added as hitpoint data. 0 = original points, 1 = gapfilled, 2 = extrapolated at downward edge, 3 = extrapolated at upward edge |
| int LiDARcloud::getCellBeamCount | ( | uint | index | ) | const |
Get the number of beams that entered a grid cell during the leaf-area inversion.
| [in] | index | Index of a grid cell. |
| helios::vec3 LiDARcloud::getCellCenter | ( | uint | index | ) | const |
Get the (x,y,z) coordinate of a grid cell by its index.
| [in] | index | Index of a grid cell. Note: the index of a grid cell is given by the order in which it was added to the grid. E.g., the first cell's index is 0, and the last cell's index is Ncells-1. |
| helios::vec3 LiDARcloud::getCellGlobalAnchor | ( | uint | index | ) | const |
Get the (x,y,z) coordinate of a grid global anchor by its index.
| [in] | index | Index of a grid cell. Note: the index of a grid cell is given by the order in which it was added to the grid. E.g., the first cell's index is 0, and the last cell's index is Ncells-1. |
| float LiDARcloud::getCellGtheta | ( | uint | index | ) | const |
| float LiDARcloud::getCellLADVariance | ( | uint | index | ) | const |
| float LiDARcloud::getCellLeafArea | ( | uint | index | ) | const |
| bool LiDARcloud::getCellLeafAreaConfidenceInterval | ( | uint | index, |
| float | confidence_level, | ||
| float & | lower, | ||
| float & | upper | ||
| ) | const |
Get the single-voxel sampling confidence interval on leaf area.
Returns the interval centered on the cell's leaf-area point estimate. Returns false (no interval written) when the voxel falls outside the Pimont (2018) Table-3 validity envelope, rather than emitting an untrustworthy interval.
| [in] | index | Index of a grid cell. |
| [in] | confidence_level | Confidence level in (0,1), e.g. 0.95. |
| [out] | lower | Lower bound of the leaf-area confidence interval [m^2]. |
| [out] | upper | Upper bound of the leaf-area confidence interval [m^2]. |
| float LiDARcloud::getCellLeafAreaDensity | ( | uint | index | ) | const |
| float LiDARcloud::getCellMeanPathLength | ( | uint | index | ) | const |
| float LiDARcloud::getCellRelativeDensityIndex | ( | uint | index | ) | const |
| float LiDARcloud::getCellRotation | ( | uint | index | ) | const |
Get the rotation angle of a grid cell about the z-axis by its index.
| [in] | index | Index of a grid cell. Note: the index of a grid cell is given by the order in which it was added to the grid. E.g., the first cell's index is 0, and the last cell's index is Ncells-1. |
| helios::vec3 LiDARcloud::getCellSize | ( | uint | index | ) | const |
| void LiDARcloud::getGridBoundingBox | ( | helios::vec3 & | boxmin, |
| helios::vec3 & | boxmax | ||
| ) | const |
| uint LiDARcloud::getGridCellCount | ( | void | ) | const |
| bool LiDARcloud::getGroupLADConfidenceInterval | ( | const std::vector< uint > & | indices, |
| float | confidence_level, | ||
| float & | mean_lad, | ||
| float & | lower, | ||
| float & | upper | ||
| ) | const |
Get the group-scale sampling confidence interval on mean leaf area density - the recommended path.
Computes the confidence interval on the mean LAD over a set of voxels, assuming voxel independence (Pimont et al. 2018, Eq. 39): mean_LAD +- z * sqrt(sum(sigma^2)) / n_v. Voxels outside the Table-3 validity envelope are skipped (not counted in n_v).
| [in] | indices | Indices of the grid cells in the group. |
| [in] | confidence_level | Confidence level between 0 and 1, e.g. 0.95. |
| [out] | mean_lad | Mean leaf area density over the valid voxels in the group, in 1/m. |
| [out] | lower | Lower bound of the mean-LAD confidence interval, in 1/m. |
| [out] | upper | Upper bound of the mean-LAD confidence interval, in 1/m. |
| void LiDARcloud::getHitBoundingBox | ( | helios::vec3 & | boxmin, |
| helios::vec3 & | boxmax | ||
| ) | const |
| uint LiDARcloud::getHitCount | ( | ) | const |
| double LiDARcloud::getHitData | ( | uint | index, |
| const char * | label | ||
| ) | const |
| void LiDARcloud::getHitDataColumn | ( | const char * | label, |
| std::vector< double > & | data, | ||
| double | absent_value = -9999 |
||
| ) | const |
Bulk-read a per-hit scalar field across all hits into a contiguous array.
This is the fast path for extracting a whole scalar field from a large cloud: it is a single cache-linear pass over the field's storage column, equivalent in cost to getHitXYZ over all hits, rather than N separate getHitData lookups. The output has one entry per hit, in hit-index order; hits that have no value for the label receive absent_value.
| [in] | label | Label of the data value (e.g., "intensity"). |
| [out] | data | Filled with one value per hit (resized to getHitCount()). |
| [in] | absent_value | Value written for hits that lack the label (default -9999, matching the sentinel used by ASCII export). |
| int LiDARcloud::getHitDataColumnIndex | ( | const char * | label | ) | const |
Get the internal column index for a hit-data label.
Per-hit scalar data is stored column-wise (see getHitDataColumn()). This returns the column slot for a label, which is useful for repeated bulk access without re-resolving the label.
| [in] | label | Label of the data value (e.g., "intensity"). |
| int LiDARcloud::getHitGridCell | ( | uint | index | ) | const |
Get the grid cell in which the hit point resides.
| [in] | index | Hit number |
Get the index of a scan point based on its row and column in the hit table.
| [in] | scanID | ID of scan. |
| [in] | row | Row in the 2D scan data table (elevation angle). |
| [in] | column | Column in the 2D scan data table (azimuthal angle). |
| helios::vec3 LiDARcloud::getHitOrigin | ( | uint | index | ) | const |
Get the (x,y,z) origin from which the beam producing this hit point was emitted.
For moving-platform scans (see addScanMoving()) each hit stores its own per-pulse emission origin in the data labels "origin_x"/"origin_y"/"origin_z"; this function returns that origin. For static scans (which store no per-hit origin) it falls back to the single scan origin getScanOrigin() of the hit's scan.
| [in] | index | Hit number |
| helios::SphericalCoord LiDARcloud::getHitRaydir | ( | uint | index | ) | const |
| int LiDARcloud::getHitScanID | ( | uint | index | ) | const |
| helios::vec3 LiDARcloud::getHitXYZ | ( | uint | index | ) | const |
| float LiDARcloud::getScanAngleNoiseStdDev | ( | uint | scanID | ) | const |
| float LiDARcloud::getScanAzimuthOffset | ( | uint | scanID | ) | const |
| float LiDARcloud::getScanBeamDivergence | ( | uint | scanID | ) | const |
| float LiDARcloud::getScanBeamExitDiameter | ( | uint | scanID | ) | const |
| std::vector< float > LiDARcloud::getScanBeamZenithAngles | ( | uint | scanID | ) | const |
Get the per-channel zenith angles of a spinning multibeam scan.
| [in] | scanID | ID of scan. |
| std::vector< std::string > LiDARcloud::getScanColumnFormat | ( | uint | scanID | ) | const |
| uint LiDARcloud::getScanCount | ( | ) |
| float LiDARcloud::getScanDetectionThreshold | ( | uint | scanID | ) | const |
| int LiDARcloud::getScanMaxReturns | ( | uint | scanID | ) | const |
Get the maximum number of returns reported per pulse in single/limited-return mode.
| [in] | scanID | ID of scan. |
Get the high-level acquisition-mode descriptor of a scan.
| [in] | scanID | ID of scan. |
| helios::vec3 LiDARcloud::getScanOrigin | ( | uint | scanID | ) | const |
| ScanPattern LiDARcloud::getScanPattern | ( | uint | scanID | ) | const |
Get the geometric beam pattern of a scan.
| [in] | scanID | ID of scan. |
| float LiDARcloud::getScanPulseWidth | ( | uint | scanID | ) | const |
Get the range resolution (transmit pulse range-extent) of a scan in meters.
| [in] | scanID | ID of scan. |
| float LiDARcloud::getScanRangeNoiseStdDev | ( | uint | scanID | ) | const |
| helios::vec2 LiDARcloud::getScanRangePhi | ( | uint | scanID | ) | const |
| helios::vec2 LiDARcloud::getScanRangeTheta | ( | uint | scanID | ) | const |
| ReturnMode LiDARcloud::getScanReturnMode | ( | uint | scanID | ) | const |
Get the return-reporting mode of a scan.
| [in] | scanID | ID of scan. |
| double LiDARcloud::getScanRevolutions | ( | uint | scanID | ) | const |
| std::vector< RisleyPrism > LiDARcloud::getScanRisleyPrisms | ( | uint | scanID | ) | const |
Get the rotating wedge prisms of a Risley-prism (Livox-style rosette) scan.
| [in] | scanID | ID of scan. |
| double LiDARcloud::getScanRisleyRefractiveIndexAir | ( | uint | scanID | ) | const |
| double LiDARcloud::getScanRotationRate | ( | uint | scanID | ) | const |
| SingleReturnSelection LiDARcloud::getScanSingleReturnSelection | ( | uint | scanID | ) | const |
Get the single-return selection policy of a scan.
| [in] | scanID | ID of scan. |
Get the number of azimuth firing steps per full 360-degree revolution of a spinning multibeam scan.
| [in] | scanID | ID of scan. |
| float LiDARcloud::getScanTiltPitch | ( | uint | scanID | ) | const |
| float LiDARcloud::getScanTiltRoll | ( | uint | scanID | ) | const |
| size_t LiDARcloud::getSyntheticScanMemoryBudget | ( | ) | const |
Get the soft memory budget (in bytes) for the transient ray-tracing buffers used during syntheticScan.
| Triangulation LiDARcloud::getTriangle | ( | uint | index | ) | const |
| uint LiDARcloud::getTriangleCount | ( | ) | const |
| std::size_t LiDARcloud::getTriangulationCandidateCount | ( | ) | const |
| std::size_t LiDARcloud::getTriangulationDroppedByAspect | ( | ) | const |
| std::size_t LiDARcloud::getTriangulationDroppedByDegenerate | ( | ) | const |
| std::size_t LiDARcloud::getTriangulationDroppedByLmax | ( | ) | const |
| bool LiDARcloud::hasMisses | ( | ) | const |
Determine whether the point cloud contains any miss points.
Leaf-area inversion (calculateLeafArea()) requires misses to count the beams transmitted through each voxel.
| void LiDARcloud::initializeCollisionDetection | ( | helios::Context * | context | ) |
| bool LiDARcloud::isGPUAccelerationEnabled | ( | ) | const |
| bool LiDARcloud::isGPUAvailable | ( | ) | const |
Check whether a CUDA-capable GPU is available for acceleration.
Returns true only if the CollisionDetection plugin was compiled with CUDA support, a CUDA device is present at runtime, and the GPU path is not disabled via the HELIOS_NO_GPU environment variable. Reports capability; use isGPUAccelerationEnabled() to query whether GPU acceleration is currently toggled on.
| bool LiDARcloud::isHitMiss | ( | uint | index | ) | const |
Determine whether a hit point is a "miss" (a fired pulse that returned nothing)
A miss represents a laser beam transmitted through the scene to the sky. Misses are stored as points placed along the beam direction at LIDAR_MISS_DISTANCE.
| [in] | index | Hit point index |
is_miss data == 1), or, for legacy data lacking the flag, if its range reaches LIDAR_MISS_DISTANCE. | void LiDARcloud::lastHitFilter | ( | ) |
Filter multi-return data to include only the last hit per laser pulse. The resulting point cloud will have only one hit point per laser pulse (last hits).
| void LiDARcloud::leafReconstructionAlphaMask | ( | float | minimum_leaf_group_area, |
| float | maximum_leaf_group_area, | ||
| float | leaf_aspect_ratio, | ||
| const char * | mask_file | ||
| ) |
Perform a leaf reconstruction based on texture-masked Patches within each gridcell. The reconstruction produces Patches for each reconstructed leaf surface, with leaf size automatically estimated algorithmically.
| [in] | minimum_leaf_group_area | Minimum allowable area of leaf triangular fill groups. Leaf fill groups with total areas less than minimum_leaf_group_area are not considered in the reconstruction. |
| [in] | maximum_leaf_group_area | Maximum area of leaf triangular fill groups. Leaf fill groups with total areas greater than maximum_leaf_group_area are not considered in the reconstruction. |
| [in] | leaf_aspect_ratio | Ratio of length of leaf along midrib to with of leaf perpendicular to leaf midrib. This will generally be the length/width of leaf mask. |
| [in] | mask_file | Path to PNG image file to be used with Alpha Mask. |
| void LiDARcloud::leafReconstructionAlphaMask | ( | float | minimum_leaf_group_area, |
| float | maximum_leaf_group_area, | ||
| float | leaf_aspect_ratio, | ||
| float | leaf_length_constant, | ||
| const char * | mask_file | ||
| ) |
Perform a leaf reconstruction based on texture-masked Patches within each gridcell. The reconstruction produces Patches for each reconstructed leaf surface, with leaf size set to a constant value.
| [in] | minimum_leaf_group_area | Minimum allowable area of leaf triangular fill groups. Leaf fill groups with total areas less than minimum_leaf_group_area are not considered in the reconstruction. |
| [in] | maximum_leaf_group_area | Maximum area of leaf triangular fill groups. Leaf fill groups with total areas greater than maximum_leaf_group_area are not considered in the reconstruction. |
| [in] | leaf_aspect_ratio | Ratio of length of leaf along midrib to with of leaf perpendicular to leaf midrib. This will generally be the length/width of leaf mask. |
| [in] | leaf_length_constant | Constant length of all reconstructed leaves. |
| [in] | mask_file | Path to PNG image file to be used with Alpha Mask. |
| size_t LiDARcloud::loadASCIIFile | ( | uint | scanID, |
| const std::string & | ASCII_data_file | ||
| ) |
Load point cloud data from a tabular ASCII text file into an existing scan.
| [in] | scanID | ID of the scan to which the point cloud data should be added. |
| [in] | ASCII_data_file | Metadata for point cloud data contained in the ASCII text file. |
Definition at line 896 of file fileIO.cpp.
| std::vector< uint > LiDARcloud::loadTreeQSM | ( | helios::Context * | context, |
| const std::string & | filename, | ||
| uint | radial_subdivisions, | ||
| const std::string & | texture_file = "" |
||
| ) |
Read a TreeQSM cylinder file and add tube objects to the context for each branch.
| [in] | context | Pointer to the Helios context where tube objects will be added. |
| [in] | filename | Path to the TreeQSM cylinder text file. |
| [in] | radial_subdivisions | Number of radial subdivisions for the tube objects. |
| [in] | texture_file | Optional path to texture image file for the tube objects. If empty, tubes will be colored red. |
Definition at line 1829 of file fileIO.cpp.
| std::vector< uint > LiDARcloud::loadTreeQSMColormap | ( | helios::Context * | context, |
| const std::string & | filename, | ||
| uint | radial_subdivisions, | ||
| const std::string & | colormap_name | ||
| ) |
Read a TreeQSM cylinder file and add tube objects to the context for each branch with colormap-based coloring.
| [in] | context | Pointer to the Helios context where tube objects will be added. |
| [in] | filename | Path to the TreeQSM cylinder text file. |
| [in] | radial_subdivisions | Number of radial subdivisions for the tube objects. |
| [in] | colormap_name | Name of the Helios colormap to use for coloring branches (e.g., "hot", "cool", "rainbow"). |
Definition at line 1833 of file fileIO.cpp.
| void LiDARcloud::loadXML | ( | const char * | filename | ) |
Read an XML file containing scan information.
| [in] | filename | Path to XML file |
Definition at line 127 of file fileIO.cpp.
| void LiDARcloud::loadXML | ( | const char * | filename, |
| bool | load_grid_only | ||
| ) |
Read an XML file containing scan information.
| [in] | filename | Path to XML file |
| [in] | load_grid_only | if true only the voxel grid defined in the xml file will be loaded, the scans themselves will not be loaded. |
Definition at line 131 of file fileIO.cpp.
| void LiDARcloud::maxPulseFilter | ( | const char * | scalar | ) |
Filter multi-return data according to the maximum scalar value along each pulse. Any scalar value can be used, provided it is a field in the hit point data file. The resulting point cloud will have only one hit point per laser pulse.
| [in] | scalar | Name of hit point scalar data in the hit data file. |
| void LiDARcloud::minPulseFilter | ( | const char * | scalar | ) |
Filter multi-return data according to the minimum scalar value along each pulse. Any scalar value can be used, provided it is a field in the hit point data file. The resulting point cloud will have only one hit point per laser pulse.
| [in] | scalar | Name of hit point scalar data in the ASCII hit data file. |
| std::vector< uint > LiDARcloud::peakFinder | ( | std::vector< float > | signal | ) |
find the indices of the peaks of a vector of floats
| [in] | signal | the signal we want to detect peaks in |
| void LiDARcloud::performUnifiedRayTracing | ( | helios::Context * | context, |
| size_t | N, | ||
| int | Npulse, | ||
| helios::vec3 * | ray_origins, | ||
| helios::vec3 * | direction, | ||
| float * | hit_t, | ||
| float * | hit_fnorm, | ||
| int * | hit_ID | ||
| ) |
| void LiDARcloud::reflectanceFilter | ( | float | minreflectance | ) |
Filter scan by imposing a minimum reflectance value.
| [in] | minreflectance | Miniimum hit point reflectance value |
| void LiDARcloud::scalarFilter | ( | const char * | scalar_field, |
| float | threshold, | ||
| const char * | comparator | ||
| ) |
Filter hit points based on a scalar field given by a column in the ASCII data.
| [in] | scalar_field | Name of a scalar field defined in the ASCII point cloud data (e.g., "reflectance") |
| [in] | threshold | Value for filter threshold |
| [in] | comparator | Points will be filtered if "scalar (comparator) threshold", where (comparator) is one of ">", "<", or "=" |
|
static |
Self-test (unit test) function.
Definition at line 12 of file selfTest.cpp.
| void LiDARcloud::setCancelFlag | ( | volatile int * | flag | ) |
Register an external cancellation flag polled during long-running operations.
When the pointed-to int becomes non-zero, the current long-running operation aborts at the next poll point. syntheticScan() stops its parallel ray loop and returns early with whatever hits were recorded so far; triangulateHitPoints() discards any partial mesh and returns an empty triangulation. The flag is owned by the caller (e.g. a ctypes int shared with Python) and must outlive the operation; pass nullptr to clear. Set this before calling the operation to be cancelled.
| [in] | flag | Pointer to a 0/non-zero cancellation flag, or nullptr. |
| void LiDARcloud::setCellGtheta | ( | float | Gtheta, |
| uint | index | ||
| ) |
Set the average G(theta) value of a grid cell.
| [in] | Gtheta | G(theta) in cell. |
| [in] | index | Index of a grid cell. Note: the index of a grid cell is given by the order in which it was added to the grid. E.g., the first cell's index is 0, and the last cell's index is Ncells-1. |
| void LiDARcloud::setCellLeafArea | ( | float | area, |
| uint | index | ||
| ) |
Set the leaf area of a grid cell in m^2.
| [in] | area | Leaf area in cell in m^2. |
| [in] | index | Index of a grid cell. Note: the index of a grid cell is given by the order in which it was added to the grid. E.g., the first cell's index is 0, and the last cell's index is Ncells-1. |
| void LiDARcloud::setExternalTriangulation | ( | const std::vector< helios::vec3 > & | triangle_vertices, |
| const std::vector< int > & | scanIDs | ||
| ) |
Replace the internal triangulation with an externally-supplied world-space mesh.
Bypasses the internal Constrained-Delaunay triangulation so a mesh produced elsewhere (e.g. a re-used Helios triangulation, or a per-scan open3d Ball-Pivot mesh) can drive leaf-area inversion. Leaf-area inversion only consumes triangulation through the per-voxel G(theta) leaf-angle term (see calculateLeafArea()), which needs each triangle's three vertices, its source scan (to recover the ray zenith from getScanOrigin()), and the grid cell its centroid falls in – nothing about the triangulation topology. This method supplies exactly that, then sets the triangulation-computed flag so calculateLeafArea() runs unchanged.
A grid must already be defined (see addGrid()). Each triangle's grid cell is determined by centroid containment; triangles whose centroid lies outside every cell are kept but contribute to no cell (same as the internal path). Degenerate (zero/NaN-area) triangles are dropped. Any previously-computed triangulation is discarded.
| [in] | triangle_vertices | Flat list of triangle vertices in world coordinates, three consecutive entries (v0, v1, v2) per triangle. Size must be a multiple of 3. |
| [in] | scanIDs | Source scan index for each triangle (size = triangle_vertices.size()/3). Used to recover the ray direction for G(theta); every entry must be a valid scan index in [0, getScanCount()). Per-scan provenance is required – a merged mesh with no scan association is not a valid input for leaf-area inversion. |
| void LiDARcloud::setHitData | ( | uint | index, |
| const char * | label, | ||
| double | value | ||
| ) |
| void LiDARcloud::setHitGridCell | ( | uint | index, |
| int | cell | ||
| ) |
| void LiDARcloud::setProgressCallback | ( | std::function< void(float, const std::string &)> | callback | ) |
Register a callback to receive progress updates during syntheticScan.
progress_fraction is in [0, 1]. message describes the current operation phase. Pass an empty std::function to clear the callback.
| [in] | callback | Function that receives (progress_fraction, message_string). |
| void LiDARcloud::setScanDetectionThreshold | ( | uint | scanID, |
| float | detectionThreshold | ||
| ) |
| void LiDARcloud::setScanMaxReturns | ( | uint | scanID, |
| int | maxReturns | ||
| ) |
Set the maximum number of returns reported per pulse in single/limited-return mode.
| [in] | scanID | ID of scan. |
| [in] | maxReturns | Maximum returns per pulse (must be >= 1): 1 = single-return, 2 = dual-return, N = N-return. The kept returns are the subset chosen by setScanSingleReturnSelection. Ignored in RETURN_MODE_MULTI. |
| void LiDARcloud::setScanPulseWidth | ( | uint | scanID, |
| float | pulseWidth | ||
| ) |
Set the range resolution (transmit pulse range-extent) of a scan in meters.
| [in] | scanID | ID of scan. |
| [in] | pulseWidth | Range resolution in meters; surfaces closer than this merge into one return. 0 falls back to the syntheticScan pulse_distance_threshold argument. |
| void LiDARcloud::setScanReturnMode | ( | uint | scanID, |
| ReturnMode | returnMode | ||
| ) |
Set the return-reporting mode of a scan.
| [in] | scanID | ID of scan. |
| [in] | returnMode | RETURN_MODE_MULTI to report all detected returns, or RETURN_MODE_SINGLE for one return per pulse. |
| void LiDARcloud::setScanSingleReturnSelection | ( | uint | scanID, |
| SingleReturnSelection | selection | ||
| ) |
Set the single-return selection policy of a scan.
| [in] | scanID | ID of scan. |
| [in] | selection | Which return to report in single-return mode (SINGLE_RETURN_STRONGEST, SINGLE_RETURN_FIRST, SINGLE_RETURN_LAST, or SINGLE_RETURN_STRONGEST_PLUS_LAST). |
| void LiDARcloud::setSyntheticScanMemoryBudget | ( | size_t | bytes | ) |
Set the soft memory budget (in bytes) for the transient ray-tracing buffers used during syntheticScan.
syntheticScan fans each laser pulse out into rays_per_pulse sub-rays; for a large multi-return scan the total number of simultaneously-traced sub-rays (beams x rays_per_pulse) can demand tens of gigabytes if traced in one batch. To bound this, the per-scan beam fan-out is processed in chunks sized so that the live trace buffers stay near this budget, independent of the scan resolution. Larger rays_per_pulse automatically yields fewer beams per chunk. The budget bounds only the transient scratch buffers, not the output point cloud (which grows with the number of recorded returns). A very small budget is clamped up internally so each chunk still contains at least one beam and stays large enough for efficient batched ray tracing.
If never called, the budget is automatic and path-dependent: SYNTHETIC_SCAN_DEFAULT_BUDGET_GPU (8 GiB) on a GPU build and SYNTHETIC_SCAN_DEFAULT_BUDGET_CPU (4 GiB) otherwise. Call this to override that with a fixed cap (typically to lower peak memory on a constrained host).
| [in] | bytes | Soft cap in bytes on the live ray-tracing scratch buffers. Must be > 0. |
| void LiDARcloud::setSyntheticScanProgressPointer | ( | volatile int * | ptr | ) |
Register an external counter for per-scan syntheticScan progress.
syntheticScan writes the 0-based index of the scan it is currently ray-tracing into the pointed-to int, updated at the start of each scan, and sets it to getScanCount() when the batch finishes. The counter is owned by the caller (e.g. a ctypes int shared with Python) and must outlive the scan; pass nullptr to clear. Set this before calling syntheticScan().
| [in] | ptr | Pointer to a caller-owned progress counter, or nullptr. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context | ) |
Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse.
| [in] | context | Pointer to the Helios context |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| bool | append | ||
| ) |
Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse.
| [in] | context | Pointer to the Helios context |
| [in] | append | If true, new hit points are appended to existing data. If false, existing hit points are cleared before adding new ones. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| bool | scan_grid_only, | ||
| bool | record_misses | ||
| ) |
Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | scan_grid_only | If true, only record hit points for rays that intersect the voxel grid. |
| [in] | record_misses | If true, "miss" points (i.e., beam did not hit any primitives) are recorded in the scan. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| bool | scan_grid_only, | ||
| bool | record_misses, | ||
| bool | append | ||
| ) |
Run a single-return synthetic LiDAR scan based on scan parameters given in an XML file, returning one laser hit per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | scan_grid_only | If true, only record hit points for rays that intersect the voxel grid. |
| [in] | record_misses | If true, "miss" points (i.e., beam did not hit any primitives) are recorded in the scan. |
| [in] | append | If true, new hit points are appended to existing data. If false, existing hit points are cleared before adding new ones. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| int | rays_per_pulse, | ||
| float | pulse_distance_threshold | ||
| ) |
Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | rays_per_pulse | Number of ray launches per laser pulse direction. |
| [in] | pulse_distance_threshold | Threshold distance for determining laser hit locations. Hits within pulse_distance_threshold of each other will be grouped into a single hit. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| int | rays_per_pulse, | ||
| float | pulse_distance_threshold, | ||
| bool | append | ||
| ) |
Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | rays_per_pulse | Number of ray launches per laser pulse direction. |
| [in] | pulse_distance_threshold | Threshold distance for determining laser hit locations. Hits within pulse_distance_threshold of each other will be grouped into a single hit. |
| [in] | append | If true, new hit points are appended to existing data. If false, existing hit points are cleared before adding new ones. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| int | rays_per_pulse, | ||
| float | pulse_distance_threshold, | ||
| bool | scan_grid_only, | ||
| bool | record_misses | ||
| ) |
Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | rays_per_pulse | Number of ray launches per laser pulse direction. |
| [in] | pulse_distance_threshold | Threshold distance for determining laser hit locations. Hits within pulse_distance_threshold of each other will be grouped into a single hit. |
| [in] | scan_grid_only | If true, only considers context geometry within the scan grid. scan_grid_only=true can save substantial memory for contexts with large domains. |
| [in] | record_misses | If true, "miss" points (i.e., beam did not hit any primitives) are recorded in the scan. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| int | rays_per_pulse, | ||
| float | pulse_distance_threshold, | ||
| bool | scan_grid_only, | ||
| bool | record_misses, | ||
| bool | append | ||
| ) |
Run a multi-return synthetic LiDAR scan based on scan parameters given in an XML file, returning multiple laser hits per pulse.
| [in] | context | Pointer to the Helios context. |
| [in] | rays_per_pulse | Number of ray launches per laser pulse direction. |
| [in] | pulse_distance_threshold | Threshold distance for determining laser hit locations. Hits within pulse_distance_threshold of each other will be grouped into a single hit. |
| [in] | scan_grid_only | If true, only considers context geometry within the scan grid. scan_grid_only=true can save substantial memory for contexts with large domains. |
| [in] | record_misses | If true, "miss" points (i.e., beam did not hit any primitives) are recorded in the scan. |
| [in] | append | If true, new hit points are appended to existing data. If false, existing hit points are cleared before adding new ones. |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| int | rays_per_pulse, | ||
| float | pulse_distance_threshold, | ||
| ReturnMode | return_mode, | ||
| bool | scan_grid_only = false, |
||
| bool | record_misses = false, |
||
| bool | append = true |
||
| ) |
Run a synthetic LiDAR scan with an explicit return-reporting mode (analytic-waveform processing)
Fires rays_per_pulse sub-rays per pulse and forms an analytic (sum-of-Gaussians) waveform whose detected returns are reported according to return_mode. With RETURN_MODE_MULTI all detected returns are reported; with RETURN_MODE_SINGLE up to the scan's getScanMaxReturns returns per pulse are reported (see setScanSingleReturnSelection), and (in single-return mode, maxReturns=1) two surfaces within the pulse range-resolution blend into one return at an intermediate range (a "ghost"/"mixed pixel" point). The range-resolution used to merge returns is the scan's getScanPulseWidth when set, otherwise pulse_distance_threshold; the noise floor is the scan's getScanDetectionThreshold. This overrides each scan's stored getScanReturnMode for this call only (the stored value is restored afterward); the per-scan getScanMaxReturns and selection policy still apply.
| [in] | context | Pointer to the Helios context. |
| [in] | rays_per_pulse | Number of ray launches per laser pulse direction. A value of 1 produces an idealized exact-intersection scan regardless of return_mode. |
| [in] | pulse_distance_threshold | Range-resolution distance used to merge sub-ray hits into returns when the scan's pulse width is 0. Hits within this distance merge into one return. |
| [in] | return_mode | RETURN_MODE_MULTI to report all detected returns, or RETURN_MODE_SINGLE for one return per pulse. |
| [in] | scan_grid_only | If true, only considers context geometry within the scan grid. [optional] |
| [in] | record_misses | If true, "miss" points (beam did not hit any primitives) are recorded in the scan. [optional] |
| [in] | append | If true, new hit points are appended to existing data; if false, existing hit points are cleared first. [optional] |
| void LiDARcloud::triangulateHitPoints | ( | float | Lmax, |
| float | max_aspect_ratio | ||
| ) |
Perform triangulation on all hit points in point cloud.
| [in] | Lmax | Maximum allowable length of triangle sides. |
| [in] | max_aspect_ratio | Maximum allowable aspect ratio of triangles. |
| void LiDARcloud::triangulateHitPoints | ( | float | Lmax, |
| float | max_aspect_ratio, | ||
| const char * | scalar_field, | ||
| float | threshold, | ||
| const char * | comparator | ||
| ) |
Perform triangulation on hit points in point cloud that meet some filtering criteria based on scalar data.
| [in] | Lmax | Maximum allowable length of triangle sides. |
| [in] | max_aspect_ratio | Maximum allowable aspect ratio of triangles. |
| [in] | scalar_field | Name of a scalar field defined in the ASCII point cloud data (e.g., "deviation") |
| [in] | threshold | Value for filter threshold |
| [in] | comparator | Points will not be used in triangulation if "scalar (comparator) threshold", where (comparator) is one of ">", "<", or "=" |
| void LiDARcloud::trunkReconstruction | ( | const helios::vec3 & | box_center, |
| const helios::vec3 & | box_size, | ||
| float | Lmax, | ||
| float | max_aspect_ratio | ||
| ) |
Reconstruct the trunk of the tree. In order to do this, you must specify the center and size of a rectangular box that encompasses the tree trunk. This routine will then try to find the largest continuous triangle group, which is assumed to correspond to the trunk.
| [in] | box_center | (x,y,z) coordinates of the center of a rectangular box that encompasses the tree trunk. |
| [in] | box_size | Dimension of the trunk box in the x-, y-, and z- directions. |
| [in] | Lmax | maximum dimension of triangles (see also triangulateHitPoints()). |
| [in] | max_aspect_ratio | Maximum allowable aspect ratio of triangles (see also triangulateHitPoints()) |
| void LiDARcloud::xyzFilter | ( | float | xmin, |
| float | xmax, | ||
| float | ymin, | ||
| float | ymax, | ||
| float | zmin, | ||
| float | zmax | ||
| ) |
overloaded version of xyzFilter that defaults to deleting points outside the provided bounding box
| [in] | xmin | minimum x coordinate of bounding box |
| [in] | xmax | maximum x coordinate of bounding box |
| [in] | ymin | minimum y coordinate of bounding box |
| [in] | ymax | maximum y coordinate of bounding box |
| [in] | zmin | minimum z coordinate of bounding box |
| [in] | zmax | maximum z coordinate of bounding box |
| void LiDARcloud::xyzFilter | ( | float | xmin, |
| float | xmax, | ||
| float | ymin, | ||
| float | ymax, | ||
| float | zmin, | ||
| float | zmax, | ||
| bool | deleteOutside | ||
| ) |
Filter scan with a bounding box.
| [in] | xmin | minimum x coordinate of bounding box |
| [in] | xmax | maximum x coordinate of bounding box |
| [in] | ymin | minimum y coordinate of bounding box |
| [in] | ymax | maximum y coordinate of bounding box |
| [in] | zmin | minimum z coordinate of bounding box |
| [in] | zmax | maximum z coordinate of bounding box |
| [in] | deleteOutside | if true, deletes points outside the bounding box, if false deletes points inside the bounding box |
|
staticconstexpr |
Distance (m) at which a "miss" point is placed along its beam direction.
A fired pulse that returns nothing (transmitted to the sky) is represented as a point at this distance from the scan origin along the beam. The value is far beyond any real target so misses are unambiguously classified as transmitted beams in the leaf-area inversion. Shared by gapfillMisses(), syntheticScan(), and the miss classification (see isHitMiss()). This is the distance at which the miss POINT is positioned in the cloud; it is distinct from LIDAR_RAYTRACE_MISS_T, the ray-tracer's internal no-hit parameter.
|
staticconstexpr |
Ray-tracer "no hit" parameter (m): the maximum ray length passed to the backend.
A traced ray that intersects nothing returns this value as its hit distance t. The synthetic-scan miss detection compares the returned t against this sentinel to decide whether a beam hit a primitive. This is an internal ray-tracing threshold and is NOT the distance at which a miss point is placed in the cloud (that is LIDAR_MISS_DISTANCE). Used by performUnifiedRayTracing() and syntheticScan().