How can I change the color of points in ccPointCloud?

Feel free to ask any question here
Post Reply
yjf27281181
Posts: 16
Joined: Mon Sep 26, 2016 12:46 am

How can I change the color of points in ccPointCloud?

Post by yjf27281181 »

Hi Denial!
I need your help.
Here is my problem, I use CC to read a data and then CC generate a ccGenericPointCloud. now I want to change this ccGenericPointCloud to a ccPointCloud with some scalars and let CC change points' color in this ccPointCloud according to the certain number in the first scalar. How can I do this?

ps: now I could generate ccPointCloud, but I don't know how to associate colormap(or something else) to scalars of ccPointCloud.
daniel
Site Admin
Posts: 7396
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: How can I change the color of points in ccPointCloud?

Post by daniel »

I guess you have already found that ccPointCloud instances are also ccGenericPointCloud instances.

Now if you want to add scalars, you'll need to add a scalar field to the cloud (you can see how this is done in several places, look for methods that creat 'ccScalarField' instances). And you can associate this ccScalarField object to color scales (ccColorScale). the Color Scale Manager (ccColorScaleManager) can provide you with default scales.

If you opt for a relative color scale, scalar fields also have some display settings (min and max saturation, etc.) to let you control how colors are assigned to points.
Daniel, CloudCompare admin
Post Reply