Description Usage Arguments Value References Examples
View source: R/project_voxels.R
Project a voxel cloud in a 2D plan formed by two axes of the cartesian coordiantes system.
1 | project_voxels(data, plan, message)
|
data |
a data.frame or data.table containing the x, y, z, ... coordinates of a voxel cloud. |
plan |
character. Defines the projection plan: "xy", "xz" or "yz". Default = "xy". |
message |
logical. If FALSE, messages are disabled. Default = TRUE. |
A data frame of a 2D point cloud containing : x, y coordinates of the pixels and the number of voxels (nvox), number of points (npts), ratio npts/nvox contained in each pixel.
Lecigne, B., Delagrange, S., & Messier, C. (2018). Exploring trees in three dimensions: VoxR, a novel voxel-based R package dedicated to analysing the complex arrangement of tree crowns. Annals of botany, 121(4), 589-601.
1 2 3 4 5 6 7 8 9 10 11 12 13 | #- import tls data
tls=data.table::fread(system.file("extdata", "Tree_t0.asc", package="VoxR"))
#- voxelisation
voxels = VoxR::vox(tls,0.05)
#- project into the xy plan
project_xy = VoxR::project_voxels(voxels,"xy")
VoxR::plot_projection(project_xy) # plot projection
#- project into the xz plan
project_xy = VoxR::project_voxels(voxels,"xz")
VoxR::plot_projection(project_xy) # plot projection
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.