Command Line export PLY set xml color scale

Feel free to ask any question here
henrydice
Posts: 6
Joined: Fri Apr 10, 2020 9:14 am

Command Line export PLY set xml color scale

Post by henrydice »

Hello,

I am trying to batch export a series of .csv pointclouds into .ply. I managed to use the command lines to do so but I cannot seem to apply a specific color scale to each pointcloud. Here is my command line (which is nested in a for loop) :

cloudcompare.CloudCompare -SILENT -AUTO_SAVE OFF -C_EXPORT_FMT PLY -PLY_EXPORT_FMT ASCII -O $file -SET_ACTIVE_SF 5 -SF_COLOR_SCALE viridis.xml -SF_CONVERT_TO_RGB TRUE -NO_TIMESTAMP -SAVE_CLOUDS

And here is the result when I run the shell script :

(process:5142): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Auto-save is disabled
Output export format (clouds) set to: PLY
[LOADING]
Opening file: '/home/ng/Videos/test_rename/18.csv'
Found one cloud with 65536 points
Set active S.F. index: 5
[SF COLOR SCALE]
[ERROR] Failed to read color scale file 'viridis.xml'!
Processed finished in 0.20 s.

The viridis.xml file is located in the same folder as the script. I tried with several namings, including the file path, but I always get the same error message.

Would anyone know where does the problem come from ?

Ultimately, I would like to be able to apply any color scale of this palette : https://cran.r-project.org/web/packages ... ridis.html

Thank you in advance.

H
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Command Line export PLY set xml color scale

Post by WargodHernandez »

Can you post that XML file, it appears that the file was opened but not supported and gave no error messages, in the code that loads the XML it appears there are shortcuts to break out of loading if incorrectly formatted, but there is no corresponding error message for each of those cases.
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line export PLY set xml color scale

Post by daniel »

It works on my side with this command:
-AUTO_SAVE OFF -C_EXPORT_FMT PLY -PLY_EXPORT_FMT ASCII -O "F:\Data\ASCII\Lyon_copy.asc" -SET_ACTIVE_SF 1 -SF_COLOR_SCALE "F:\Data\ASCII\veridis.xml" -SF_CONVERT_TO_RGB TRUE -NO_TIMESTAMP -SAVE_CLOUDS

(I always put quotes around file paths just in case - even if here there's space characters)

I'm using the latest 2.11.beta version, and I saved the viridis.xml file from the "Color Scale Manager".
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Command Line export PLY set xml color scale

Post by WargodHernandez »

I am guessing its not a file path issue because his log should have shown an error if the file couldn't be found or opened.
from ccColorScale.cpp LN 422:

Code: Select all

ccLog::Error(QString("Failed to open file '%1' for reading!").arg(filename));
but if it opens the file and hits one break statements in the while loop prior to initializing the return pointer on line 470:

Code: Select all

scale = Shared(new ccColorScale("temp"));
then the return value will be null with no error messages explaining what went wrong.

Here are the breaks I'm referring to LN 433-467:

Code: Select all

//expected: CloudCompare
		if (	!stream.readNextStartElement()
			||	stream.name() != s_xmlCloudCompare)
		{
			break;
		}

		//expected: ColorScale
		if (	!stream.readNextStartElement()
			||	stream.name() != s_xmlColorScaleTitle)
		{
			break;
		}

		//read version number
		QXmlStreamAttributes attributes = stream.attributes();
		if (attributes.size() == 0 || attributes[0].name() != "version")
		{
			break;
		}
		bool ok = false;
		int version = attributes[0].value().toString().toInt(&ok);
		if (!ok || version > s_xmlColorScaleVer)
		{
			if (ok)
				ccLog::Warning(QString("[ccColorScale::LoadFromXML] Unhandled version: %1").arg(version));
			break;
		}

		//expected: Properties
		if (	!stream.readNextStartElement()
			||	stream.name() != s_xmlColorScaleProperties)
		{
			break;
		}
Only the wrong version warning is actually used but for the other file checks no warning is issued.

That is why I suspect the virdis XML file is not a cloud compare XML
henrydice
Posts: 6
Joined: Fri Apr 10, 2020 9:14 am

Re: Command Line export PLY set xml color scale

Post by henrydice »

Hello,

Thank you for you replies.

I'm unable to attach the file to this message because the format doesn't seem to fit but I've downloaded it from this page : https://gist.github.com/binarybottle/9b ... 8aabac12dc
henrydice
Posts: 6
Joined: Fri Apr 10, 2020 9:14 am

Re: Command Line export PLY set xml color scale

Post by henrydice »

daniel wrote: Fri Apr 10, 2020 8:34 pm It works on my side with this command:
-AUTO_SAVE OFF -C_EXPORT_FMT PLY -PLY_EXPORT_FMT ASCII -O "F:\Data\ASCII\Lyon_copy.asc" -SET_ACTIVE_SF 1 -SF_COLOR_SCALE "F:\Data\ASCII\veridis.xml" -SF_CONVERT_TO_RGB TRUE -NO_TIMESTAMP -SAVE_CLOUDS

(I always put quotes around file paths just in case - even if here there's space characters)

I'm using the latest 2.11.beta version, and I saved the viridis.xml file from the "Color Scale Manager".
I tried the same technique, exporting the viridis xml from cloudcompare (renamed 'viridis2.xml'), but I still get the same error message. It may be worth noting I'm using Ubuntu 19.04. Here is the full shell script, in case it helps :

Code: Select all

#/bin/bash
for file in /home/ng/Videos/test_rename/*;
do
    if [ -f $file ]; then
        cloudcompare.CloudCompare -SILENT -AUTO_SAVE OFF -C_EXPORT_FMT PLY -PLY_EXPORT_FMT ASCII -O $file -SET_ACTIVE_SF 5 -SF_COLOR_SCALE "/home/ng/Videos/viridis2.xml" -SF_CONVERT_TO_RGB TRUE -NO_TIMESTAMP -SAVE_CLOUDS
    fi
done
and the error message :

Code: Select all

(process:7291): Gtk-WARNING **: Locale not supported by C library.
	Using the fallback 'C' locale.
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Auto-save is disabled
Output export format (clouds) set to: PLY
[LOADING]
Opening file: '/home/ng/Videos/test_rename/18.csv'
Found one cloud with 65536 points
Set active S.F. index: 5
[SF COLOR SCALE]
[ERROR] Failed to read color scale file '/home/ng/Videos/viridis2.xml'!
Processed finished in 0.19 s.
daniel
Site Admin
Posts: 7721
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: Command Line export PLY set xml color scale

Post by daniel »

Can you try with mine:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CloudCompare>
    <ColorScale version="1">
        <Properties>
            <name>Viridis_copy</name>
            <uuid>{f1f6e0a0-c522-4a00-9cee-ef644f2133e1}</uuid>
            <absolute>0</absolute>
        </Properties>
        <Data>
            <step r="68" g="1" b="84" pos="0"/>
            <step r="68" g="2" b="85" pos="0.00392156862745"/>
            <step r="68" g="3" b="87" pos="0.0078431372549"/>
            <step r="69" g="5" b="88" pos="0.0117647058824"/>
            <step r="69" g="6" b="90" pos="0.0156862745098"/>
            <step r="69" g="8" b="91" pos="0.0196078431373"/>
            <step r="70" g="9" b="92" pos="0.0235294117647"/>
            <step r="70" g="11" b="94" pos="0.0274509803922"/>
            <step r="70" g="12" b="95" pos="0.0313725490196"/>
            <step r="70" g="14" b="97" pos="0.0352941176471"/>
            <step r="71" g="15" b="98" pos="0.0392156862745"/>
            <step r="71" g="17" b="99" pos="0.043137254902"/>
            <step r="71" g="18" b="101" pos="0.0470588235294"/>
            <step r="71" g="20" b="102" pos="0.0509803921569"/>
            <step r="71" g="21" b="103" pos="0.0549019607843"/>
            <step r="71" g="22" b="105" pos="0.0588235294118"/>
            <step r="71" g="24" b="106" pos="0.0627450980392"/>
            <step r="72" g="25" b="107" pos="0.0666666666667"/>
            <step r="72" g="26" b="108" pos="0.0705882352941"/>
            <step r="72" g="28" b="110" pos="0.0745098039216"/>
            <step r="72" g="29" b="111" pos="0.078431372549"/>
            <step r="72" g="30" b="112" pos="0.0823529411765"/>
            <step r="72" g="32" b="113" pos="0.0862745098039"/>
            <step r="72" g="33" b="114" pos="0.0901960784314"/>
            <step r="72" g="34" b="115" pos="0.0941176470588"/>
            <step r="72" g="35" b="116" pos="0.0980392156863"/>
            <step r="71" g="37" b="117" pos="0.101960784314"/>
            <step r="71" g="38" b="118" pos="0.105882352941"/>
            <step r="71" g="39" b="119" pos="0.109803921569"/>
            <step r="71" g="40" b="120" pos="0.113725490196"/>
            <step r="71" g="42" b="121" pos="0.117647058824"/>
            <step r="71" g="43" b="122" pos="0.121568627451"/>
            <step r="71" g="44" b="123" pos="0.125490196078"/>
            <step r="70" g="45" b="124" pos="0.129411764706"/>
            <step r="70" g="47" b="124" pos="0.133333333333"/>
            <step r="70" g="48" b="125" pos="0.137254901961"/>
            <step r="70" g="49" b="126" pos="0.141176470588"/>
            <step r="69" g="50" b="127" pos="0.145098039216"/>
            <step r="69" g="52" b="127" pos="0.149019607843"/>
            <step r="69" g="53" b="128" pos="0.152941176471"/>
            <step r="69" g="54" b="129" pos="0.156862745098"/>
            <step r="68" g="55" b="129" pos="0.160784313725"/>
            <step r="68" g="57" b="130" pos="0.164705882353"/>
            <step r="67" g="58" b="131" pos="0.16862745098"/>
            <step r="67" g="59" b="131" pos="0.172549019608"/>
            <step r="67" g="60" b="132" pos="0.176470588235"/>
            <step r="66" g="61" b="132" pos="0.180392156863"/>
            <step r="66" g="62" b="133" pos="0.18431372549"/>
            <step r="66" g="64" b="133" pos="0.188235294118"/>
            <step r="65" g="65" b="134" pos="0.192156862745"/>
            <step r="65" g="66" b="134" pos="0.196078431373"/>
            <step r="64" g="67" b="135" pos="0.2"/>
            <step r="64" g="68" b="135" pos="0.203921568627"/>
            <step r="63" g="69" b="135" pos="0.207843137255"/>
            <step r="63" g="71" b="136" pos="0.211764705882"/>
            <step r="62" g="72" b="136" pos="0.21568627451"/>
            <step r="62" g="73" b="137" pos="0.219607843137"/>
            <step r="61" g="74" b="137" pos="0.223529411765"/>
            <step r="61" g="75" b="137" pos="0.227450980392"/>
            <step r="61" g="76" b="137" pos="0.23137254902"/>
            <step r="60" g="77" b="138" pos="0.235294117647"/>
            <step r="60" g="78" b="138" pos="0.239215686275"/>
            <step r="59" g="80" b="138" pos="0.243137254902"/>
            <step r="59" g="81" b="138" pos="0.247058823529"/>
            <step r="58" g="82" b="139" pos="0.250980392157"/>
            <step r="58" g="83" b="139" pos="0.254901960784"/>
            <step r="57" g="84" b="139" pos="0.258823529412"/>
            <step r="57" g="85" b="139" pos="0.262745098039"/>
            <step r="56" g="86" b="139" pos="0.266666666667"/>
            <step r="56" g="87" b="140" pos="0.270588235294"/>
            <step r="55" g="88" b="140" pos="0.274509803922"/>
            <step r="55" g="89" b="140" pos="0.278431372549"/>
            <step r="54" g="90" b="140" pos="0.282352941176"/>
            <step r="54" g="91" b="140" pos="0.286274509804"/>
            <step r="53" g="92" b="140" pos="0.290196078431"/>
            <step r="53" g="93" b="140" pos="0.294117647059"/>
            <step r="52" g="94" b="141" pos="0.298039215686"/>
            <step r="52" g="95" b="141" pos="0.301960784314"/>
            <step r="51" g="96" b="141" pos="0.305882352941"/>
            <step r="51" g="97" b="141" pos="0.309803921569"/>
            <step r="50" g="98" b="141" pos="0.313725490196"/>
            <step r="50" g="99" b="141" pos="0.317647058824"/>
            <step r="49" g="100" b="141" pos="0.321568627451"/>
            <step r="49" g="101" b="141" pos="0.325490196078"/>
            <step r="49" g="102" b="141" pos="0.329411764706"/>
            <step r="48" g="103" b="141" pos="0.333333333333"/>
            <step r="48" g="104" b="141" pos="0.337254901961"/>
            <step r="47" g="105" b="141" pos="0.341176470588"/>
            <step r="47" g="106" b="141" pos="0.345098039216"/>
            <step r="46" g="107" b="142" pos="0.349019607843"/>
            <step r="46" g="108" b="142" pos="0.352941176471"/>
            <step r="46" g="109" b="142" pos="0.356862745098"/>
            <step r="45" g="110" b="142" pos="0.360784313725"/>
            <step r="45" g="111" b="142" pos="0.364705882353"/>
            <step r="44" g="112" b="142" pos="0.36862745098"/>
            <step r="44" g="113" b="142" pos="0.372549019608"/>
            <step r="44" g="114" b="142" pos="0.376470588235"/>
            <step r="43" g="115" b="142" pos="0.380392156863"/>
            <step r="43" g="116" b="142" pos="0.38431372549"/>
            <step r="42" g="117" b="142" pos="0.388235294118"/>
            <step r="42" g="118" b="142" pos="0.392156862745"/>
            <step r="42" g="119" b="142" pos="0.396078431373"/>
            <step r="41" g="120" b="142" pos="0.4"/>
            <step r="41" g="121" b="142" pos="0.403921568627"/>
            <step r="40" g="122" b="142" pos="0.407843137255"/>
            <step r="40" g="122" b="142" pos="0.411764705882"/>
            <step r="40" g="123" b="142" pos="0.41568627451"/>
            <step r="39" g="124" b="142" pos="0.419607843137"/>
            <step r="39" g="125" b="142" pos="0.423529411765"/>
            <step r="39" g="126" b="142" pos="0.427450980392"/>
            <step r="38" g="127" b="142" pos="0.43137254902"/>
            <step r="38" g="128" b="142" pos="0.435294117647"/>
            <step r="38" g="129" b="142" pos="0.439215686275"/>
            <step r="37" g="130" b="142" pos="0.443137254902"/>
            <step r="37" g="131" b="141" pos="0.447058823529"/>
            <step r="36" g="132" b="141" pos="0.450980392157"/>
            <step r="36" g="133" b="141" pos="0.454901960784"/>
            <step r="36" g="134" b="141" pos="0.458823529412"/>
            <step r="35" g="135" b="141" pos="0.462745098039"/>
            <step r="35" g="136" b="141" pos="0.466666666667"/>
            <step r="35" g="137" b="141" pos="0.470588235294"/>
            <step r="34" g="137" b="141" pos="0.474509803922"/>
            <step r="34" g="138" b="141" pos="0.478431372549"/>
            <step r="34" g="139" b="141" pos="0.482352941176"/>
            <step r="33" g="140" b="141" pos="0.486274509804"/>
            <step r="33" g="141" b="140" pos="0.490196078431"/>
            <step r="33" g="142" b="140" pos="0.494117647059"/>
            <step r="32" g="143" b="140" pos="0.498039215686"/>
            <step r="32" g="144" b="140" pos="0.501960784314"/>
            <step r="32" g="145" b="140" pos="0.505882352941"/>
            <step r="31" g="146" b="140" pos="0.509803921569"/>
            <step r="31" g="147" b="139" pos="0.513725490196"/>
            <step r="31" g="148" b="139" pos="0.517647058824"/>
            <step r="31" g="149" b="139" pos="0.521568627451"/>
            <step r="31" g="150" b="139" pos="0.525490196078"/>
            <step r="30" g="151" b="138" pos="0.529411764706"/>
            <step r="30" g="152" b="138" pos="0.533333333333"/>
            <step r="30" g="153" b="138" pos="0.537254901961"/>
            <step r="30" g="153" b="138" pos="0.541176470588"/>
            <step r="30" g="154" b="137" pos="0.545098039216"/>
            <step r="30" g="155" b="137" pos="0.549019607843"/>
            <step r="30" g="156" b="137" pos="0.552941176471"/>
            <step r="30" g="157" b="136" pos="0.556862745098"/>
            <step r="30" g="158" b="136" pos="0.560784313725"/>
            <step r="30" g="159" b="136" pos="0.564705882353"/>
            <step r="30" g="160" b="135" pos="0.56862745098"/>
            <step r="31" g="161" b="135" pos="0.572549019608"/>
            <step r="31" g="162" b="134" pos="0.576470588235"/>
            <step r="31" g="163" b="134" pos="0.580392156863"/>
            <step r="32" g="164" b="133" pos="0.58431372549"/>
            <step r="32" g="165" b="133" pos="0.588235294118"/>
            <step r="33" g="166" b="133" pos="0.592156862745"/>
            <step r="33" g="167" b="132" pos="0.596078431373"/>
            <step r="34" g="167" b="132" pos="0.6"/>
            <step r="35" g="168" b="131" pos="0.603921568627"/>
            <step r="35" g="169" b="130" pos="0.607843137255"/>
            <step r="36" g="170" b="130" pos="0.611764705882"/>
            <step r="37" g="171" b="129" pos="0.61568627451"/>
            <step r="38" g="172" b="129" pos="0.619607843137"/>
            <step r="39" g="173" b="128" pos="0.623529411765"/>
            <step r="40" g="174" b="127" pos="0.627450980392"/>
            <step r="41" g="175" b="127" pos="0.63137254902"/>
            <step r="42" g="176" b="126" pos="0.635294117647"/>
            <step r="43" g="177" b="125" pos="0.639215686275"/>
            <step r="44" g="177" b="125" pos="0.643137254902"/>
            <step r="46" g="178" b="124" pos="0.647058823529"/>
            <step r="47" g="179" b="123" pos="0.650980392157"/>
            <step r="48" g="180" b="122" pos="0.654901960784"/>
            <step r="50" g="181" b="122" pos="0.658823529412"/>
            <step r="51" g="182" b="121" pos="0.662745098039"/>
            <step r="53" g="183" b="120" pos="0.666666666667"/>
            <step r="54" g="184" b="119" pos="0.670588235294"/>
            <step r="56" g="185" b="118" pos="0.674509803922"/>
            <step r="57" g="185" b="118" pos="0.678431372549"/>
            <step r="59" g="186" b="117" pos="0.682352941176"/>
            <step r="61" g="187" b="116" pos="0.686274509804"/>
            <step r="62" g="188" b="115" pos="0.690196078431"/>
            <step r="64" g="189" b="114" pos="0.694117647059"/>
            <step r="66" g="190" b="113" pos="0.698039215686"/>
            <step r="68" g="190" b="112" pos="0.701960784314"/>
            <step r="69" g="191" b="111" pos="0.705882352941"/>
            <step r="71" g="192" b="110" pos="0.709803921569"/>
            <step r="73" g="193" b="109" pos="0.713725490196"/>
            <step r="75" g="194" b="108" pos="0.717647058824"/>
            <step r="77" g="194" b="107" pos="0.721568627451"/>
            <step r="79" g="195" b="105" pos="0.725490196078"/>
            <step r="81" g="196" b="104" pos="0.729411764706"/>
            <step r="83" g="197" b="103" pos="0.733333333333"/>
            <step r="85" g="198" b="102" pos="0.737254901961"/>
            <step r="87" g="198" b="101" pos="0.741176470588"/>
            <step r="89" g="199" b="100" pos="0.745098039216"/>
            <step r="91" g="200" b="98" pos="0.749019607843"/>
            <step r="94" g="201" b="97" pos="0.752941176471"/>
            <step r="96" g="201" b="96" pos="0.756862745098"/>
            <step r="98" g="202" b="95" pos="0.760784313725"/>
            <step r="100" g="203" b="93" pos="0.764705882353"/>
            <step r="103" g="204" b="92" pos="0.76862745098"/>
            <step r="105" g="204" b="91" pos="0.772549019608"/>
            <step r="107" g="205" b="89" pos="0.776470588235"/>
            <step r="109" g="206" b="88" pos="0.780392156863"/>
            <step r="112" g="206" b="86" pos="0.78431372549"/>
            <step r="114" g="207" b="85" pos="0.788235294118"/>
            <step r="116" g="208" b="84" pos="0.792156862745"/>
            <step r="119" g="208" b="82" pos="0.796078431373"/>
            <step r="121" g="209" b="81" pos="0.8"/>
            <step r="124" g="210" b="79" pos="0.803921568627"/>
            <step r="126" g="210" b="78" pos="0.807843137255"/>
            <step r="129" g="211" b="76" pos="0.811764705882"/>
            <step r="131" g="211" b="75" pos="0.81568627451"/>
            <step r="134" g="212" b="73" pos="0.819607843137"/>
            <step r="136" g="213" b="71" pos="0.823529411765"/>
            <step r="139" g="213" b="70" pos="0.827450980392"/>
            <step r="141" g="214" b="68" pos="0.83137254902"/>
            <step r="144" g="214" b="67" pos="0.835294117647"/>
            <step r="146" g="215" b="65" pos="0.839215686275"/>
            <step r="149" g="215" b="63" pos="0.843137254902"/>
            <step r="151" g="216" b="62" pos="0.847058823529"/>
            <step r="154" g="216" b="60" pos="0.850980392157"/>
            <step r="157" g="217" b="58" pos="0.854901960784"/>
            <step r="159" g="217" b="56" pos="0.858823529412"/>
            <step r="162" g="218" b="55" pos="0.862745098039"/>
            <step r="165" g="218" b="53" pos="0.866666666667"/>
            <step r="167" g="219" b="51" pos="0.870588235294"/>
            <step r="170" g="219" b="50" pos="0.874509803922"/>
            <step r="173" g="220" b="48" pos="0.878431372549"/>
            <step r="175" g="220" b="46" pos="0.882352941176"/>
            <step r="178" g="221" b="44" pos="0.886274509804"/>
            <step r="181" g="221" b="43" pos="0.890196078431"/>
            <step r="183" g="221" b="41" pos="0.894117647059"/>
            <step r="186" g="222" b="39" pos="0.898039215686"/>
            <step r="189" g="222" b="38" pos="0.901960784314"/>
            <step r="191" g="223" b="36" pos="0.905882352941"/>
            <step r="194" g="223" b="34" pos="0.909803921569"/>
            <step r="197" g="223" b="33" pos="0.913725490196"/>
            <step r="199" g="224" b="31" pos="0.917647058824"/>
            <step r="202" g="224" b="30" pos="0.921568627451"/>
            <step r="205" g="224" b="29" pos="0.925490196078"/>
            <step r="207" g="225" b="28" pos="0.929411764706"/>
            <step r="210" g="225" b="27" pos="0.933333333333"/>
            <step r="212" g="225" b="26" pos="0.937254901961"/>
            <step r="215" g="226" b="25" pos="0.941176470588"/>
            <step r="218" g="226" b="24" pos="0.945098039216"/>
            <step r="220" g="226" b="24" pos="0.949019607843"/>
            <step r="223" g="227" b="24" pos="0.952941176471"/>
            <step r="225" g="227" b="24" pos="0.956862745098"/>
            <step r="228" g="227" b="24" pos="0.960784313725"/>
            <step r="231" g="228" b="25" pos="0.964705882353"/>
            <step r="233" g="228" b="25" pos="0.96862745098"/>
            <step r="236" g="228" b="26" pos="0.972549019608"/>
            <step r="238" g="229" b="27" pos="0.976470588235"/>
            <step r="241" g="229" b="28" pos="0.980392156863"/>
            <step r="243" g="229" b="30" pos="0.98431372549"/>
            <step r="246" g="230" b="31" pos="0.988235294118"/>
            <step r="248" g="230" b="33" pos="0.992156862745"/>
            <step r="250" g="230" b="34" pos="0.996078431373"/>
            <step r="253" g="231" b="36" pos="1"/>
        </Data>
    </ColorScale>
</CloudCompare>
Daniel, CloudCompare admin
WargodHernandez
Posts: 187
Joined: Tue Mar 05, 2019 3:59 pm

Re: Command Line export PLY set xml color scale

Post by WargodHernandez »

The file at the gist you linked to is not a cloud compare format for color scales. But once you created an export from CC it should have worked with that file if it was the only issue.

Since it didn't work for you can you follow these steps to eliminate the GTK issues first
askUbuntu.com GTK locale warning

and also install the missing modules

Code: Select all

apt-get install libatk-adaptor libgail-common libcanberra-gtk-module
I just want to check whether or not those local issues are causing the xml file reader to misinterpret the attribute names
henrydice
Posts: 6
Joined: Fri Apr 10, 2020 9:14 am

Re: Command Line export PLY set xml color scale

Post by henrydice »

daniel wrote: Sun Apr 12, 2020 5:04 pm Can you try with mine:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<CloudCompare>
    <ColorScale version="1">
        <Properties>
            <name>Viridis_copy</name>
            <uuid>{f1f6e0a0-c522-4a00-9cee-ef644f2133e1}</uuid>
            <absolute>0</absolute>
        </Properties>
        <Data>
            <step r="68" g="1" b="84" pos="0"/>
            <step r="68" g="2" b="85" pos="0.00392156862745"/>
            <step r="68" g="3" b="87" pos="0.0078431372549"/>
            <step r="69" g="5" b="88" pos="0.0117647058824"/>
            <step r="69" g="6" b="90" pos="0.0156862745098"/>
            <step r="69" g="8" b="91" pos="0.0196078431373"/>
            <step r="70" g="9" b="92" pos="0.0235294117647"/>
            <step r="70" g="11" b="94" pos="0.0274509803922"/>
            <step r="70" g="12" b="95" pos="0.0313725490196"/>
            <step r="70" g="14" b="97" pos="0.0352941176471"/>
            <step r="71" g="15" b="98" pos="0.0392156862745"/>
            <step r="71" g="17" b="99" pos="0.043137254902"/>
            <step r="71" g="18" b="101" pos="0.0470588235294"/>
            <step r="71" g="20" b="102" pos="0.0509803921569"/>
            <step r="71" g="21" b="103" pos="0.0549019607843"/>
            <step r="71" g="22" b="105" pos="0.0588235294118"/>
            <step r="71" g="24" b="106" pos="0.0627450980392"/>
            <step r="72" g="25" b="107" pos="0.0666666666667"/>
            <step r="72" g="26" b="108" pos="0.0705882352941"/>
            <step r="72" g="28" b="110" pos="0.0745098039216"/>
            <step r="72" g="29" b="111" pos="0.078431372549"/>
            <step r="72" g="30" b="112" pos="0.0823529411765"/>
            <step r="72" g="32" b="113" pos="0.0862745098039"/>
            <step r="72" g="33" b="114" pos="0.0901960784314"/>
            <step r="72" g="34" b="115" pos="0.0941176470588"/>
            <step r="72" g="35" b="116" pos="0.0980392156863"/>
            <step r="71" g="37" b="117" pos="0.101960784314"/>
            <step r="71" g="38" b="118" pos="0.105882352941"/>
            <step r="71" g="39" b="119" pos="0.109803921569"/>
            <step r="71" g="40" b="120" pos="0.113725490196"/>
            <step r="71" g="42" b="121" pos="0.117647058824"/>
            <step r="71" g="43" b="122" pos="0.121568627451"/>
            <step r="71" g="44" b="123" pos="0.125490196078"/>
            <step r="70" g="45" b="124" pos="0.129411764706"/>
            <step r="70" g="47" b="124" pos="0.133333333333"/>
            <step r="70" g="48" b="125" pos="0.137254901961"/>
            <step r="70" g="49" b="126" pos="0.141176470588"/>
            <step r="69" g="50" b="127" pos="0.145098039216"/>
            <step r="69" g="52" b="127" pos="0.149019607843"/>
            <step r="69" g="53" b="128" pos="0.152941176471"/>
            <step r="69" g="54" b="129" pos="0.156862745098"/>
            <step r="68" g="55" b="129" pos="0.160784313725"/>
            <step r="68" g="57" b="130" pos="0.164705882353"/>
            <step r="67" g="58" b="131" pos="0.16862745098"/>
            <step r="67" g="59" b="131" pos="0.172549019608"/>
            <step r="67" g="60" b="132" pos="0.176470588235"/>
            <step r="66" g="61" b="132" pos="0.180392156863"/>
            <step r="66" g="62" b="133" pos="0.18431372549"/>
            <step r="66" g="64" b="133" pos="0.188235294118"/>
            <step r="65" g="65" b="134" pos="0.192156862745"/>
            <step r="65" g="66" b="134" pos="0.196078431373"/>
            <step r="64" g="67" b="135" pos="0.2"/>
            <step r="64" g="68" b="135" pos="0.203921568627"/>
            <step r="63" g="69" b="135" pos="0.207843137255"/>
            <step r="63" g="71" b="136" pos="0.211764705882"/>
            <step r="62" g="72" b="136" pos="0.21568627451"/>
            <step r="62" g="73" b="137" pos="0.219607843137"/>
            <step r="61" g="74" b="137" pos="0.223529411765"/>
            <step r="61" g="75" b="137" pos="0.227450980392"/>
            <step r="61" g="76" b="137" pos="0.23137254902"/>
            <step r="60" g="77" b="138" pos="0.235294117647"/>
            <step r="60" g="78" b="138" pos="0.239215686275"/>
            <step r="59" g="80" b="138" pos="0.243137254902"/>
            <step r="59" g="81" b="138" pos="0.247058823529"/>
            <step r="58" g="82" b="139" pos="0.250980392157"/>
            <step r="58" g="83" b="139" pos="0.254901960784"/>
            <step r="57" g="84" b="139" pos="0.258823529412"/>
            <step r="57" g="85" b="139" pos="0.262745098039"/>
            <step r="56" g="86" b="139" pos="0.266666666667"/>
            <step r="56" g="87" b="140" pos="0.270588235294"/>
            <step r="55" g="88" b="140" pos="0.274509803922"/>
            <step r="55" g="89" b="140" pos="0.278431372549"/>
            <step r="54" g="90" b="140" pos="0.282352941176"/>
            <step r="54" g="91" b="140" pos="0.286274509804"/>
            <step r="53" g="92" b="140" pos="0.290196078431"/>
            <step r="53" g="93" b="140" pos="0.294117647059"/>
            <step r="52" g="94" b="141" pos="0.298039215686"/>
            <step r="52" g="95" b="141" pos="0.301960784314"/>
            <step r="51" g="96" b="141" pos="0.305882352941"/>
            <step r="51" g="97" b="141" pos="0.309803921569"/>
            <step r="50" g="98" b="141" pos="0.313725490196"/>
            <step r="50" g="99" b="141" pos="0.317647058824"/>
            <step r="49" g="100" b="141" pos="0.321568627451"/>
            <step r="49" g="101" b="141" pos="0.325490196078"/>
            <step r="49" g="102" b="141" pos="0.329411764706"/>
            <step r="48" g="103" b="141" pos="0.333333333333"/>
            <step r="48" g="104" b="141" pos="0.337254901961"/>
            <step r="47" g="105" b="141" pos="0.341176470588"/>
            <step r="47" g="106" b="141" pos="0.345098039216"/>
            <step r="46" g="107" b="142" pos="0.349019607843"/>
            <step r="46" g="108" b="142" pos="0.352941176471"/>
            <step r="46" g="109" b="142" pos="0.356862745098"/>
            <step r="45" g="110" b="142" pos="0.360784313725"/>
            <step r="45" g="111" b="142" pos="0.364705882353"/>
            <step r="44" g="112" b="142" pos="0.36862745098"/>
            <step r="44" g="113" b="142" pos="0.372549019608"/>
            <step r="44" g="114" b="142" pos="0.376470588235"/>
            <step r="43" g="115" b="142" pos="0.380392156863"/>
            <step r="43" g="116" b="142" pos="0.38431372549"/>
            <step r="42" g="117" b="142" pos="0.388235294118"/>
            <step r="42" g="118" b="142" pos="0.392156862745"/>
            <step r="42" g="119" b="142" pos="0.396078431373"/>
            <step r="41" g="120" b="142" pos="0.4"/>
            <step r="41" g="121" b="142" pos="0.403921568627"/>
            <step r="40" g="122" b="142" pos="0.407843137255"/>
            <step r="40" g="122" b="142" pos="0.411764705882"/>
            <step r="40" g="123" b="142" pos="0.41568627451"/>
            <step r="39" g="124" b="142" pos="0.419607843137"/>
            <step r="39" g="125" b="142" pos="0.423529411765"/>
            <step r="39" g="126" b="142" pos="0.427450980392"/>
            <step r="38" g="127" b="142" pos="0.43137254902"/>
            <step r="38" g="128" b="142" pos="0.435294117647"/>
            <step r="38" g="129" b="142" pos="0.439215686275"/>
            <step r="37" g="130" b="142" pos="0.443137254902"/>
            <step r="37" g="131" b="141" pos="0.447058823529"/>
            <step r="36" g="132" b="141" pos="0.450980392157"/>
            <step r="36" g="133" b="141" pos="0.454901960784"/>
            <step r="36" g="134" b="141" pos="0.458823529412"/>
            <step r="35" g="135" b="141" pos="0.462745098039"/>
            <step r="35" g="136" b="141" pos="0.466666666667"/>
            <step r="35" g="137" b="141" pos="0.470588235294"/>
            <step r="34" g="137" b="141" pos="0.474509803922"/>
            <step r="34" g="138" b="141" pos="0.478431372549"/>
            <step r="34" g="139" b="141" pos="0.482352941176"/>
            <step r="33" g="140" b="141" pos="0.486274509804"/>
            <step r="33" g="141" b="140" pos="0.490196078431"/>
            <step r="33" g="142" b="140" pos="0.494117647059"/>
            <step r="32" g="143" b="140" pos="0.498039215686"/>
            <step r="32" g="144" b="140" pos="0.501960784314"/>
            <step r="32" g="145" b="140" pos="0.505882352941"/>
            <step r="31" g="146" b="140" pos="0.509803921569"/>
            <step r="31" g="147" b="139" pos="0.513725490196"/>
            <step r="31" g="148" b="139" pos="0.517647058824"/>
            <step r="31" g="149" b="139" pos="0.521568627451"/>
            <step r="31" g="150" b="139" pos="0.525490196078"/>
            <step r="30" g="151" b="138" pos="0.529411764706"/>
            <step r="30" g="152" b="138" pos="0.533333333333"/>
            <step r="30" g="153" b="138" pos="0.537254901961"/>
            <step r="30" g="153" b="138" pos="0.541176470588"/>
            <step r="30" g="154" b="137" pos="0.545098039216"/>
            <step r="30" g="155" b="137" pos="0.549019607843"/>
            <step r="30" g="156" b="137" pos="0.552941176471"/>
            <step r="30" g="157" b="136" pos="0.556862745098"/>
            <step r="30" g="158" b="136" pos="0.560784313725"/>
            <step r="30" g="159" b="136" pos="0.564705882353"/>
            <step r="30" g="160" b="135" pos="0.56862745098"/>
            <step r="31" g="161" b="135" pos="0.572549019608"/>
            <step r="31" g="162" b="134" pos="0.576470588235"/>
            <step r="31" g="163" b="134" pos="0.580392156863"/>
            <step r="32" g="164" b="133" pos="0.58431372549"/>
            <step r="32" g="165" b="133" pos="0.588235294118"/>
            <step r="33" g="166" b="133" pos="0.592156862745"/>
            <step r="33" g="167" b="132" pos="0.596078431373"/>
            <step r="34" g="167" b="132" pos="0.6"/>
            <step r="35" g="168" b="131" pos="0.603921568627"/>
            <step r="35" g="169" b="130" pos="0.607843137255"/>
            <step r="36" g="170" b="130" pos="0.611764705882"/>
            <step r="37" g="171" b="129" pos="0.61568627451"/>
            <step r="38" g="172" b="129" pos="0.619607843137"/>
            <step r="39" g="173" b="128" pos="0.623529411765"/>
            <step r="40" g="174" b="127" pos="0.627450980392"/>
            <step r="41" g="175" b="127" pos="0.63137254902"/>
            <step r="42" g="176" b="126" pos="0.635294117647"/>
            <step r="43" g="177" b="125" pos="0.639215686275"/>
            <step r="44" g="177" b="125" pos="0.643137254902"/>
            <step r="46" g="178" b="124" pos="0.647058823529"/>
            <step r="47" g="179" b="123" pos="0.650980392157"/>
            <step r="48" g="180" b="122" pos="0.654901960784"/>
            <step r="50" g="181" b="122" pos="0.658823529412"/>
            <step r="51" g="182" b="121" pos="0.662745098039"/>
            <step r="53" g="183" b="120" pos="0.666666666667"/>
            <step r="54" g="184" b="119" pos="0.670588235294"/>
            <step r="56" g="185" b="118" pos="0.674509803922"/>
            <step r="57" g="185" b="118" pos="0.678431372549"/>
            <step r="59" g="186" b="117" pos="0.682352941176"/>
            <step r="61" g="187" b="116" pos="0.686274509804"/>
            <step r="62" g="188" b="115" pos="0.690196078431"/>
            <step r="64" g="189" b="114" pos="0.694117647059"/>
            <step r="66" g="190" b="113" pos="0.698039215686"/>
            <step r="68" g="190" b="112" pos="0.701960784314"/>
            <step r="69" g="191" b="111" pos="0.705882352941"/>
            <step r="71" g="192" b="110" pos="0.709803921569"/>
            <step r="73" g="193" b="109" pos="0.713725490196"/>
            <step r="75" g="194" b="108" pos="0.717647058824"/>
            <step r="77" g="194" b="107" pos="0.721568627451"/>
            <step r="79" g="195" b="105" pos="0.725490196078"/>
            <step r="81" g="196" b="104" pos="0.729411764706"/>
            <step r="83" g="197" b="103" pos="0.733333333333"/>
            <step r="85" g="198" b="102" pos="0.737254901961"/>
            <step r="87" g="198" b="101" pos="0.741176470588"/>
            <step r="89" g="199" b="100" pos="0.745098039216"/>
            <step r="91" g="200" b="98" pos="0.749019607843"/>
            <step r="94" g="201" b="97" pos="0.752941176471"/>
            <step r="96" g="201" b="96" pos="0.756862745098"/>
            <step r="98" g="202" b="95" pos="0.760784313725"/>
            <step r="100" g="203" b="93" pos="0.764705882353"/>
            <step r="103" g="204" b="92" pos="0.76862745098"/>
            <step r="105" g="204" b="91" pos="0.772549019608"/>
            <step r="107" g="205" b="89" pos="0.776470588235"/>
            <step r="109" g="206" b="88" pos="0.780392156863"/>
            <step r="112" g="206" b="86" pos="0.78431372549"/>
            <step r="114" g="207" b="85" pos="0.788235294118"/>
            <step r="116" g="208" b="84" pos="0.792156862745"/>
            <step r="119" g="208" b="82" pos="0.796078431373"/>
            <step r="121" g="209" b="81" pos="0.8"/>
            <step r="124" g="210" b="79" pos="0.803921568627"/>
            <step r="126" g="210" b="78" pos="0.807843137255"/>
            <step r="129" g="211" b="76" pos="0.811764705882"/>
            <step r="131" g="211" b="75" pos="0.81568627451"/>
            <step r="134" g="212" b="73" pos="0.819607843137"/>
            <step r="136" g="213" b="71" pos="0.823529411765"/>
            <step r="139" g="213" b="70" pos="0.827450980392"/>
            <step r="141" g="214" b="68" pos="0.83137254902"/>
            <step r="144" g="214" b="67" pos="0.835294117647"/>
            <step r="146" g="215" b="65" pos="0.839215686275"/>
            <step r="149" g="215" b="63" pos="0.843137254902"/>
            <step r="151" g="216" b="62" pos="0.847058823529"/>
            <step r="154" g="216" b="60" pos="0.850980392157"/>
            <step r="157" g="217" b="58" pos="0.854901960784"/>
            <step r="159" g="217" b="56" pos="0.858823529412"/>
            <step r="162" g="218" b="55" pos="0.862745098039"/>
            <step r="165" g="218" b="53" pos="0.866666666667"/>
            <step r="167" g="219" b="51" pos="0.870588235294"/>
            <step r="170" g="219" b="50" pos="0.874509803922"/>
            <step r="173" g="220" b="48" pos="0.878431372549"/>
            <step r="175" g="220" b="46" pos="0.882352941176"/>
            <step r="178" g="221" b="44" pos="0.886274509804"/>
            <step r="181" g="221" b="43" pos="0.890196078431"/>
            <step r="183" g="221" b="41" pos="0.894117647059"/>
            <step r="186" g="222" b="39" pos="0.898039215686"/>
            <step r="189" g="222" b="38" pos="0.901960784314"/>
            <step r="191" g="223" b="36" pos="0.905882352941"/>
            <step r="194" g="223" b="34" pos="0.909803921569"/>
            <step r="197" g="223" b="33" pos="0.913725490196"/>
            <step r="199" g="224" b="31" pos="0.917647058824"/>
            <step r="202" g="224" b="30" pos="0.921568627451"/>
            <step r="205" g="224" b="29" pos="0.925490196078"/>
            <step r="207" g="225" b="28" pos="0.929411764706"/>
            <step r="210" g="225" b="27" pos="0.933333333333"/>
            <step r="212" g="225" b="26" pos="0.937254901961"/>
            <step r="215" g="226" b="25" pos="0.941176470588"/>
            <step r="218" g="226" b="24" pos="0.945098039216"/>
            <step r="220" g="226" b="24" pos="0.949019607843"/>
            <step r="223" g="227" b="24" pos="0.952941176471"/>
            <step r="225" g="227" b="24" pos="0.956862745098"/>
            <step r="228" g="227" b="24" pos="0.960784313725"/>
            <step r="231" g="228" b="25" pos="0.964705882353"/>
            <step r="233" g="228" b="25" pos="0.96862745098"/>
            <step r="236" g="228" b="26" pos="0.972549019608"/>
            <step r="238" g="229" b="27" pos="0.976470588235"/>
            <step r="241" g="229" b="28" pos="0.980392156863"/>
            <step r="243" g="229" b="30" pos="0.98431372549"/>
            <step r="246" g="230" b="31" pos="0.988235294118"/>
            <step r="248" g="230" b="33" pos="0.992156862745"/>
            <step r="250" g="230" b="34" pos="0.996078431373"/>
            <step r="253" g="231" b="36" pos="1"/>
        </Data>
    </ColorScale>
</CloudCompare>
I tried with this xml file and it worked ! But now it makes me wonder why doesn't it work when I export color scale from cloudcompare ?
henrydice
Posts: 6
Joined: Fri Apr 10, 2020 9:14 am

Re: Command Line export PLY set xml color scale

Post by henrydice »

WargodHernandez wrote: Sun Apr 12, 2020 5:14 pm The file at the gist you linked to is not a cloud compare format for color scales. But once you created an export from CC it should have worked with that file if it was the only issue.

Since it didn't work for you can you follow these steps to eliminate the GTK issues first
askUbuntu.com GTK locale warning

and also install the missing modules

Code: Select all

apt-get install libatk-adaptor libgail-common libcanberra-gtk-module
I just want to check whether or not those local issues are causing the xml file reader to misinterpret the attribute names
I followed the links you mentioned but couldn't manage to solve the GTK issues. Here is the error message appearing even though the color scale provided by Daniel is good and the export process is now successful :

(process:1943): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Gtk-Message: Failed to load module "gail"
Gtk-Message: Failed to load module "atk-bridge"
Gtk-Message: Failed to load module "canberra-gtk-module"
Qt: Session management error: None of the authentication protocols specified are supported
Auto-save is disabled
Output export format (clouds) set to: PLY
[LOADING]
Opening file: '/home/ng/Videos/test_rename/0.csv'
Found one cloud with 65536 points
Set active S.F. index: 5
[SF COLOR SCALE]
[SF CONVERT TO RGB]
[SAVING]
Processed finished in 0.71 s.
Post Reply