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 | 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. | |
| 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. | |
| float | getScanBeamDivergence (uint scanID) const |
| Divergence angle of the laser beam in radians. | |
| helios::vec3 | getHitXYZ (uint index) const |
| Get (x,y,z) coordinate of hit point by index. | |
| 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. | |
| 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. | |
| 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 | exportPointCloud (const char *filename) |
| 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) |
| 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 | 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 full-waveform 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 full-waveform 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 full-waveform 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 full-waveform 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 | 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 size of a grid cell by its index. | |
| void | syntheticScan (helios::Context *context) |
| Run a discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only one laser hit per pulse) | |
| void | syntheticScan (helios::Context *context, bool append) |
| Run a discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only one laser hit per pulse) | |
| void | syntheticScan (helios::Context *context, bool scan_grid_only, bool record_misses) |
| Run a discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only one laser hit per pulse) | |
| void | syntheticScan (helios::Context *context, bool scan_grid_only, bool record_misses, bool append) |
| Run a discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only one laser hit per pulse) | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold) |
| Run a full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns multiple laser hits per pulse) | |
| void | syntheticScan (helios::Context *context, int rays_per_pulse, float pulse_distance_threshold, bool append) |
| Run a full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns multiple laser hits per pulse) | |
| 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. | |
| 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 | 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 | 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) | |
| 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. | |
| 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 | ) |
| 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 |
| void LiDARcloud::calculateHitGridCell | ( | ) |
| void LiDARcloud::calculateLeafArea | ( | helios::Context * | context | ) |
| void LiDARcloud::calculateLeafArea | ( | helios::Context * | context, |
| int | min_voxel_hits | ||
| ) |
| 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 | Spherical rotation angle |
| [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 793 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 773 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 753 of file fileIO.cpp.
| void LiDARcloud::exportPointCloud | ( | const char * | filename | ) |
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 |
Definition at line 813 of file fileIO.cpp.
| void LiDARcloud::exportPointCloud | ( | const char * | filename, |
| uint | scanID | ||
| ) |
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 |
Definition at line 839 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 925 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 576 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 598 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 684 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 623 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 515 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 544 of file fileIO.cpp.
| void LiDARcloud::firstHitFilter | ( | ) |
Filter full-waveform 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).
| 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 |
| 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::getCellLeafArea | ( | uint | index | ) | const |
| float LiDARcloud::getCellLeafAreaDensity | ( | uint | index | ) | const |
| float LiDARcloud::getCellRotation | ( | uint | index | ) | const |
| helios::vec3 LiDARcloud::getCellSize | ( | uint | index | ) | const |
| void LiDARcloud::getGridBoundingBox | ( | helios::vec3 & | boxmin, |
| helios::vec3 & | boxmax | ||
| ) | const |
| uint LiDARcloud::getGridCellCount | ( | void | ) | const |
| void LiDARcloud::getHitBoundingBox | ( | helios::vec3 & | boxmin, |
| helios::vec3 & | boxmax | ||
| ) | const |
| uint LiDARcloud::getHitCount | ( | ) | const |
| double LiDARcloud::getHitData | ( | uint | index, |
| const char * | label | ||
| ) | const |
| 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::SphericalCoord LiDARcloud::getHitRaydir | ( | uint | index | ) | const |
| int LiDARcloud::getHitScanID | ( | uint | index | ) | const |
| helios::vec3 LiDARcloud::getHitXYZ | ( | uint | index | ) | const |
| float LiDARcloud::getScanBeamDivergence | ( | uint | scanID | ) | const |
| float LiDARcloud::getScanBeamExitDiameter | ( | uint | scanID | ) | const |
| std::vector< std::string > LiDARcloud::getScanColumnFormat | ( | uint | scanID | ) | const |
| uint LiDARcloud::getScanCount | ( | ) |
| helios::vec3 LiDARcloud::getScanOrigin | ( | uint | scanID | ) | const |
| helios::vec2 LiDARcloud::getScanRangePhi | ( | uint | scanID | ) | const |
| helios::vec2 LiDARcloud::getScanRangeTheta | ( | uint | scanID | ) | const |
| Triangulation LiDARcloud::getTriangle | ( | uint | index | ) | const |
| uint LiDARcloud::getTriangleCount | ( | ) | const |
| void LiDARcloud::initializeCollisionDetection | ( | helios::Context * | context | ) |
| void LiDARcloud::lastHitFilter | ( | ) |
Filter full-waveform 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 403 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 1003 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 1007 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 35 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 39 of file fileIO.cpp.
| void LiDARcloud::maxPulseFilter | ( | const char * | scalar | ) |
Filter full-waveform 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 full-waveform 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::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::setHitData | ( | uint | index, |
| const char * | label, | ||
| double | value | ||
| ) |
| void LiDARcloud::setHitGridCell | ( | uint | index, |
| int | cell | ||
| ) |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context | ) |
| void LiDARcloud::syntheticScan | ( | helios::Context * | context, |
| bool | append | ||
| ) |
Run a discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only 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 discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only 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 discrete return synthetic LiDAR scan based on scan parameters given in an XML file (returns only 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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 full-waveform synthetic LiDAR scan based on scan parameters given in an XML file (returns 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::triangulateHitPoints | ( | float | Lmax, |
| float | max_aspect_ratio | ||
| ) |
| 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 |