Commit 71bf6f37 authored by Laurent Belcour's avatar Laurent Belcour Committed by Ludovic Courtès

[Doc] Updating the format of the XML file to reflect the tutorial.

parent 1b884a63
......@@ -75,61 +75,34 @@ into the file:
\page xml-format XML scripts
You can create XML formated files to run ALTA complex commands. A python
script <em>xml_cmd.py</em> is available in the directory <em>scripts</em>.
You can use it with the following command: <em>./scripts/xml_cmd.py
file.xml</em>
script `xml_cmd.py` is available in the directory `#/sources/scripts`.
You can use it with the following command: `#/sources/scripts/xml_cmd.py
file.xml`
We provide an example XML file that is self describing:
\verbatim
~~~{.xml}
<?xml version="1.0"?>
<alta>
<!-- In the configuration you can setup the relative directories -->
<configuration>
<parameter name="lib-dir" value="./build" />
</configuration>
<!-- Fit the data to a BRDF model -->
<!-- You can chain as many action as you want to perform fit. Convert
data, output to matlab/gnuplot/BRDFExplorer format -->
<action name="data2brdf">
<!-- Input and output arguments of the action -->
<input name="/home/belcour/Projects/alta/data/2d/matusik_merl/blue-metallic-paint-double-mean-romeiro-80deg.dat" />
<output name="./results/blue-metallic-paint-2lafortune.brdf" />
<!-- Define the function to use -->
<!-- You can chain multiple functions here to create a compound -->
<function name="nonlinear_function_diffuse" />
<function name="nonlinear_function_isotropic_lafortune" />
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="nonlinear_fitter_ceres" />
<action name="data2brdf">
<!-- Input and output arguments of the action -->
<input name="../data/3d/merl/blue-metallic-paint.binary" />
<output name="./results/3d/merl/blue-mettalic-paint.brdf" />
<!-- Fitting parameters -->
<parameter name="max" value="[0.8, 0.8]" />
</action>
<!-- Define the function to use -->
<function name="nonlinear_function_diffuse" />
<function name="nonlinear_function_beckmann" />
<!-- Convert the fit to BRDF explorer format -->
<action name="brdf2brdf">
<!-- Define the ftting procedure to use -->
<plugin type="fitter" name="nonlinear_fitter_ceres" />
<!-- Input and output arguments of the action -->
<input name="./results/blue-metallic-paint-2lafortune.brdf" />
<output name="./results/blue-metallic-paint-2lafortune_explorer.brdf" />
<!-- Define the data loader to use -->
<plugin type="data" name="data_merl" />
<parameter name="export" value="explorer" />
</action>
<!-- Export the fit -->
<action name="brdf2gnuplot">
<!-- Input and output arguments of the action -->
<input name="./results/blue-metallic-paint-2lafortune.brdf" />
<output name="./results/blue-metallic-paint-2lafortune.dat" />
<parameter name="data" value="/home/belcour/Projects/alta/data/2d/matusik_merl/blue-metallic-paint-double-mean-romeiro-80deg.dat" />
</action>
<!-- Parameter -->
<parameter name="export" value="explorer" />
</action>
</alta>
\endverbatim
~~~
The `<input>` command can take two different kind of attributes:
+ `name="filename"` when the action is done for a single input file.
......
......@@ -345,22 +345,9 @@ You can put multiple `<action>` commands in the xml file. Those commands will be
\page python-tutorial1 Using the Python interface
All actions can be done using Python scripts. We provide a python interface that can be loaded with:
>>> import alta
The complete python interface of ALTA can be found here : \ref python.
\page cpp-tutorial1 Using the C++ interface
It is possible to create your own programs and make use of ALTA's plugin possibilities. To do so, you only need to link you program with the core library (`libcore.a` on GNU/Linux). The core library provides all the generic objects for \ref function, \ref data, and \ref fitter. You can load a plugin and create an object using the \ref plugins_manager.
It is possible to create your own programs and make use of ALTA's plugin possibilities. To do so, you only need to link you program with the core library (`libcore.a` on GNU/Linux). The core library provides all the generic objects for \ref function "BRDF", \ref data "data", and \ref fitter "fitter". You can load a plugin and create an object using the \ref plugins_manager.
The following program produces slices of data files and outputs it on a gnuplot compliant data file. It requires an interpolant data format such as \ref data_merl, \ref data_interpolant (our internal data format is not):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment