Main Content


Convert ROI to block subscripts

Since R2022a



blocksubs = roi2blocksub(bpc,roi) converts the specified ROI roi to the block subscripts blocksubs of the blocks of the blocked point cloud data bpc contained within the ROI.


collapse all

Create a blocked point cloud from a LAZ file.

pcfile = fullfile(toolboxdir("lidar"),"lidardata", ...
bpc = blockedPointCloud(pcfile,[50 50]);

Convert ROI limits to the block subscripts of the block contained within the ROI.

blocksubs = roi2blocksub(bpc,[429745.02 429775.02 ...
                3679830.75 3679860.75 72.79 125.82]);

Display the block subscripts.

     1     1     1

Input Arguments

collapse all

Blocked point cloud, specified as a blockedPointCloud object.

ROI limits of the block, specified as a six-element row vector of form [xmin xmax ymin ymax zmin zmax], defining the range of the block.

Output Arguments

collapse all

Subscripts of the blocks, returned as a K-by-3 integer-valued matrix. K is the number of blocks in the specified ROI. The elements of each row correspond to the X-, Y- and Z-axes respectively.

Version History

Introduced in R2022a