Open PTS Ascii default as grey (also Command Line)

For user feedback or tutorials
Post Reply
jaropio
Posts: 1
Joined: Wed Dec 20, 2023 7:39 am

Open PTS Ascii default as grey (also Command Line)

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

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

Post by daniel »

Thanks for the feedback!
Daniel, CloudCompare admin
HeadLess
Posts: 56
Joined: Mon Mar 25, 2019 9:27 pm

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

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

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

Post by daniel »

SKIP only skips the 2 first rows, isn't it?
Daniel, CloudCompare admin
HeadLess
Posts: 56
Joined: Mon Mar 25, 2019 9:27 pm

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

Post 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.
Post Reply