Page 1 of 1

Rasterize tool: Image output

Posted: Mon Jul 16, 2018 2:32 pm
by damagor
Hi Daniel,

I came to use rasterize tool on cloudcompare. I have questions regarding its image output. I noticed that we can output the raster as image when I choose height grid value. However, when I choose Gaussian curvature value or any scalar field value, the image output button isn't clickable. I am curious if this is the case or anyway I can export the raster to image for other scalar field values?


Thank you,
AL

Re: Rasterize tool: Image output

Posted: Mon Jul 16, 2018 4:01 pm
by daniel
Which version are you using?

Re: Rasterize tool: Image output

Posted: Tue Jul 17, 2018 1:31 pm
by damagor
I am using v2.10 alpha.

Re: Rasterize tool: Image output

Posted: Tue Jul 17, 2018 1:33 pm
by damagor
for your reference.

Re: Rasterize tool: Image output

Posted: Tue Jul 17, 2018 5:03 pm
by daniel
Hum, you are right sadly. I thought someone updated the code since then, but apparently not! The 'Image export' option still doesn't handle scalar fields (only the altitude).

Re: Rasterize tool: Image output

Posted: Wed Jul 18, 2018 8:25 am
by damagor
I see. May you point me to the associated code in the github folder? I am interested into looking to add image option for scalar values as well as see if possible to implement it on cc command line. Thanks.

Re: Rasterize tool: Image output

Posted: Wed Jul 18, 2018 7:51 pm
by daniel
See the 'generateImage' method in 'ccRasterizeTool.cpp':
https://github.com/CloudCompare/CloudCo ... .cpp#L2137

This method only considers the altitude (see line 2229 for instance) and it saves a 8 bits image by the way.

Here you would have to check what is the active layer (activeLayerComboBox) and then change the code accordingly. You can try to understand how this works with the 'generateRaster' function (however this one does take into account the scalar fields, but it doesn't need to bother with the colors, so you'll have to extract the right color for each scalar value... don't hesitate to ask for more directions if necessary).

Re: Rasterize tool: Image output

Posted: Thu May 16, 2019 9:57 am
by bviand
hello using 2.10 version. When i make an orthophoto with rasterize tool, it work great , my only problem is that the back ground is Pink and it's very hard to see all the dots. Is there a way to change the back ground color in white or grey?

Re: Rasterize tool: Image output

Posted: Thu May 16, 2019 7:07 pm
by daniel
Are you exporting as a PNG image? (because in this case, the 'pink' points should actually be transparent - and they can be easily changed in another image editing tool as they are the only ones using this particular color).

Or are you using another export format?