Page 1 of 1

Open PTS Ascii default as grey (also Command Line)

Posted: Wed Dec 20, 2023 8:02 am
by jaropio
Hi,

I have asked question by email about how to open some PTS Ascii files that I got with Grey option.
In GUI it is available to select when open. Problem was how set up Command line for this.

Admin answered to add header to files like this:
//X Y Z Grey

And it works flawless. Adding header is not a problem and can be done with easy script to many files.

My PTS by default is like:
16456
-0.945262 -1.44468 -1.53767 192
-1.009727 -1.5313 -1.533651 190
-0.929352 -1.479882 -1.536824 194
-0.933544 -1.495135 -1.535955 192
....


After add header:
//X Y Z Grey
16456
-0.945262 -1.44468 -1.53767 192
-1.009727 -1.5313 -1.533651 190
-0.929352 -1.479882 -1.536824 194
-0.933544 -1.495135 -1.535955 192
...

* SKIP 2 lines then is needed when open from Command Line.

CMD line example:
CloudCompare -O -SKIP 2 -GLOBAL_SHIFT AUTO C:\<filepath>\File1.pts ... then Your process and export commands

Re: Open PTS Ascii default as grey (also Command Line)

Posted: Wed Dec 20, 2023 8:28 am
by daniel
Thanks for the feedback!

Re: Open PTS Ascii default as grey (also Command Line)

Posted: Wed Dec 20, 2023 9:41 am
by HeadLess
jaropio wrote: Wed Dec 20, 2023 8:02 am Hi,

I have asked question by email about how to open some PTS Ascii files that I got with Grey option.
In GUI it is available to select when open. Problem was how set up Command line for this.

Admin answered to add header to files like this:
//X Y Z Grey

And it works flawless. Adding header is not a problem and can be done with easy script to many files.

My PTS by default is like:
16456
-0.945262 -1.44468 -1.53767 192
-1.009727 -1.5313 -1.533651 190
-0.929352 -1.479882 -1.536824 194
-0.933544 -1.495135 -1.535955 192
....


After add header:
//X Y Z Grey
16456
-0.945262 -1.44468 -1.53767 192
-1.009727 -1.5313 -1.533651 190
-0.929352 -1.479882 -1.536824 194
-0.933544 -1.495135 -1.535955 192
...

* SKIP 2 lines then is needed when open from Command Line.

CMD line example:
CloudCompare -O -SKIP 2 -GLOBAL_SHIFT AUTO C:\<filepath>\File1.pts ... then Your process and export commands
that skip 2 will decimate the cloud to half the original one +1, instead of that, i think you just need to remove the number of files rows from the pts and rename it to asc, or xyz instead

Re: Open PTS Ascii default as grey (also Command Line)

Posted: Wed Dec 20, 2023 12:58 pm
by daniel
SKIP only skips the 2 first rows, isn't it?

Re: Open PTS Ascii default as grey (also Command Line)

Posted: Wed Dec 20, 2023 3:09 pm
by HeadLess
daniel wrote: Wed Dec 20, 2023 12:58 pm SKIP only skips the 2 first rows, isn't it?
Well i tought it was every second line based on the wiki. Maybe i misunderstod.

PS: I looked it up in the code it does skip only the first N lines, for me it was kind of misleading in the documentation.