Rasterize tool: Image output

Feel free to ask any question here
Post Reply
damagor
Posts: 9
Joined: Fri Jun 29, 2018 12:34 pm

Rasterize tool: Image output

Post 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
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize tool: Image output

Post by daniel »

Which version are you using?
Daniel, CloudCompare admin
damagor
Posts: 9
Joined: Fri Jun 29, 2018 12:34 pm

Re: Rasterize tool: Image output

Post by damagor »

I am using v2.10 alpha.
damagor
Posts: 9
Joined: Fri Jun 29, 2018 12:34 pm

Re: Rasterize tool: Image output

Post by damagor »

for your reference.
Attachments
s.PNG
s.PNG (21.71 KiB) Viewed 8089 times
e.PNG
e.PNG (21.24 KiB) Viewed 8089 times
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize tool: Image output

Post 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).
Daniel, CloudCompare admin
damagor
Posts: 9
Joined: Fri Jun 29, 2018 12:34 pm

Re: Rasterize tool: Image output

Post 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.
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize tool: Image output

Post 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).
Daniel, CloudCompare admin
bviand
Posts: 1
Joined: Thu May 16, 2019 9:52 am
Location: Aix les bains FRANCE

Re: Rasterize tool: Image output

Post 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?
daniel
Site Admin
Posts: 7712
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Rasterize tool: Image output

Post 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?
Daniel, CloudCompare admin
Post Reply