[Done] ascii opening in Command line

To post any request/idea for new functionalities
Post Reply
Dimitri
Posts: 156
Joined: Mon Oct 18, 2010 9:01 am
Location: Rennes (France)
Contact:

[Done] ascii opening in Command line

Post by Dimitri »

Hi Daniel,

I had never tried the command line features, and these are just great...
2 command line request:
.would it be possible to have a fully silent mode for the command-line opening of ascii files ? Because right now you still get the pop-up, and for well-behaved ascii files it requires a click (which somehow defeat the purpose of automatic scripting ;-).
.it would be great to have a way to activate a specific scalar before to call for an operation on it (e.g. -SF_active {number})

Thanks a lot

Dimitri
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: ascii opening in Command line

Post by daniel »

For the first one, I'll look at this (is it really a "normal" ascii file?).

And for the second one, I'll add this to the TODO list (mustn't be too hard to do though ;)
Daniel, CloudCompare admin
Dimitri
Posts: 156
Joined: Mon Oct 18, 2010 9:01 am
Location: Rennes (France)
Contact:

Re: ascii opening in Command line

Post by Dimitri »

Hi Daniel,

these are "normal" ascii files: no header, no special characters, just plain XYZ + scalars. When we load them through the command line, we just have to click "ok" nothing else.

Cheers

Dim
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: ascii opening in Command line

Post by daniel »

Ok, I've set the ASCII file loading procedure silent... if the cloud has less than 5 columns. After that, we don't know (for sure) if the 3 additional columns are colors, normals or even 3 scalar fields... In this case we could let the user specify precisely the file content, but it will be much more complicated to implement (I've added this to the TODO list already).

And for the other point, I've added a new option '-SET_ACTIVE_SF {index}' to let the user choose the activate scalar field (on all loaded clouds).
Daniel, CloudCompare admin
MJS
Posts: 9
Joined: Thu Feb 27, 2014 3:54 pm

Re: ascii opening in Command line

Post by MJS »

Daniel, It would be useful if on either the command line or GUI load of an ASCII file it looked at the header and took the column information from that as default. In always add //X Y Z R G B to the top of any "coloured" ASCII file. Mike.
daniel
Site Admin
Posts: 7709
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: ascii opening in Command line

Post by daniel »

Ok that's done. The ASCII importer is a little bit smarter now. It will try to guess the columns attribution from the header if any.

The header must have the same number of elements as the number of columns in the file. It must also use the same separator character. The header line should start by '//' so that CC can detect it automatically. Eventually the column names must be standard (i.e. 'X', 'Y', 'Z', 'R' or 'Red', 'Nx' or 'NormX', etc.).

In command line mode, if CC has detected everything it will open the file automatically. Otherwise, through the standard CC interface, the dialog will still appear because we are never sure of anything, and also we don't know what the user wants to do (e.g. swapping X and Z columns, etc.)

This will be available in the next official release (soon!).
Daniel, CloudCompare admin
Post Reply