Page 1 of 1
RENAME_SF - Rename scalarfield
Posted: Tue May 18, 2021 9:17 am
by Julien
Hello,
I'm trying to rename a scalarfield in a PLY from scalar_quality to quality ( so that I can then open the PLY in MeshLabs, and apply quality filters).
I just replaced v2.11 by the 2.12 alpha to be able to use RENAME_SF but it only rename a part of the filename :
The following command rename my field from "scalar_quality" to "scalar_test" :
CloudCompare.exe -O "inputfile.bin" -AUTO_SAVE OFF -RENAME_SF LAST test -M_EXPORT_FMT PLY -SAVE_MESHES
Is there a way to get the SF named "test" in the above example ( or "quality" as I need to ).
Thanks for your help !
Re: RENAME_SF - Rename scalarfield
Posted: Tue May 18, 2021 12:33 pm
by daniel
Hi,
Not sure to understand what you mean by 'but it only rename a part of the filename'?
No scalar field was renamed?
Re: RENAME_SF - Rename scalarfield
Posted: Tue May 18, 2021 1:05 pm
by Julien
Hello Daniel,
It's not the filename but really the name of the scalar field in it.
(Sorry for the mistake in the first thread... the field is rename in the ply file, but keeps the "scalar_" prefix)
Lets see the following header :
Code: Select all
ply
format binary_little_endian 1.0
comment Created by CloudCompare v2.12 alpha
comment Created 2021-05-18T11:04:47
obj_info Generated by CloudCompare!
element vertex 33940
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float scalar_quality
element face 63606
property list uchar int vertex_indices
end_header
I want to rename "property float scalar_quality" to "property float quality"
Il you look at this other header, with scalarfield renamed to "test", it keeps using the prefix "scalar_"
Code: Select all
ply
format binary_little_endian 1.0
comment Created by CloudCompare v2.12 alpha
comment Created 2021-05-18T11:04:47
obj_info Generated by CloudCompare!
element vertex 33940
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float scalar_test
element face 63606
property list uchar int vertex_indices
end_header
Is what I want doable ?
Re: RENAME_SF - Rename scalarfield
Posted: Tue May 18, 2021 1:43 pm
by daniel
Ah, ok. Actually I believe this is automatically added by CloudCompare! (so as to be able to recognize it as a scalar field when loading the file later).
For now this can not be changed...
Re: RENAME_SF - Rename scalarfield
Posted: Tue May 18, 2021 3:45 pm
by Julien
Ok !
Merci Daniel ! Thanks !
I made a little java app to read the binary ply file and change the header.
I'm gonna test this soon.
Thanks for your answer !