This task colorizes a point cloud using raster data. Each point of the point cloud receives the RGB value of the raster pixel that has the same location.

Example


; Start the application
e = ENVI()
 
; Select input data
inputPointCloudURI = Filepath('Avon.laz', $
Subdir=['data','lidar'], Root_Dir=e.Root_Dir)
inputPointCloud = e.OpenPointCloud(inputPointCloudURI)
 
inputRasterURI = Filepath('Avon.dat', $
  Subdir=['data'], Root_Dir=e.Root_Dir)
inputRaster = e.OpenRaster(inputRasterURI)
 
; Get the task from the catalog of ENVITasks
Task = ENVITask('ColorPointCloud')
 
; Define the inputs of the task
Task.INPUT_POINTCLOUD = inputPointCloud
Task.INPUT_RASTER = inputRaster
Task.OUTPUT_POINTCLOUD_URI = e.GetTemporaryFilename('las')
 
; Run the task
Task.Execute
 
; Display the point clouds in the ENVI LiDAR viewer
Viewer = ENVIPointCloudViewer()
Viewer.Display, Task.OUTPUT_POINTCLOUD

Syntax


Result = ENVITask('ColorPointCloud')

Input properties (Set, Get): INPUT_POINTCLOUD, INPUT_RASTER, KEEP_NON_OVERLAPPING_POINTS, OUTPUT_POINTCLOUD_URI, POINT_COLOR_OUTSIDE_RASTER

Output properties (Get only): OUTPUT_POINTCLOUD

Properties marked as "Set" are those that you can set to specific values. You can also retrieve their current values any time. Properties marked as "Get" are those whose values you can retrieve but not set.

Methods


This task inherits the following methods from ENVITask:

AddParameter

Execute

Parameter

ParameterNames

RemoveParameter

Properties


This task inherits the following properties from ENVITask:

COMMUTE_ON_DOWNSAMPLE

COMMUTE_ON_SUBSET

DESCRIPTION

DISPLAY_NAME

NAME

REVISION

TAGS

This task also contains the following properties:

INPUT_POINTCLOUD (required)

Specify a point cloud to colorize.

INPUT_RASTER (required)

Specify the raster to use to color the point cloud. The input raster must have spatial reference information.

KEEP_NON_OVERLAPPING_POINTS (required)

Set this property to false to remove points outside the raster footprint when creating the output point cloud. If set to true, the points are colored according to the POINT_COLOR_OUTSIDE_RASTER parameter. The default is true.

OUTPUT_POINTCLOUD

This is a reference to the output point cloud.

OUTPUT_POINTCLOUD_URI (optional)

Specify the URI for the output of the colored point cloud file.

POINT_COLOR_OUTSIDE_RASTER (optional)

Specify the color of the points that are outside of the raster footprint as a byte array of dimension 3 describing the intensity of each R, G and B channels. The default is [0, 0, 0] (black).

Version History


ENVI 5.4

Introduced

ENVI 5.5

Replaced INPUT_POINTCLOUD_URI with INPUT_POINTCLOUD

Removed SPATIALREF Property

API Version


4.3

See Also


ENVITask, ENVI::OpenPointCloud, ENVIPointCloud, ENVIPointCloudProductsInfo, ENVIPointCloudQuery, ENVISpatialSubsetPointCloud, ENVIPointCloudSpatialRef, ENVIPointCloudViewer, ENVIPointCloudFilter, ENVIPointCloudMetadata, PointCloudFeatureExtraction Task, CreatePointCloudSubProject Task, CreatePointCloud Task