0
|
1 <?xml version='1.0' encoding='UTF-8'?>
|
|
2 <tool id="icqsol_add_texture" name="Add texture image" version="@WRAPPER_VERSION@.0">
|
|
3 <description>to a shape surface</description>
|
|
4 <macros>
|
|
5 <import>icqsol_macros.xml</import>
|
|
6 </macros>
|
|
7 <expand macro="requirements" />
|
|
8 <command>
|
|
9 <![CDATA[
|
|
10 python $__tool_directory__/icqsol_add_texture.py
|
|
11 --input "$input"
|
|
12 --input_file_format_and_type $input.ext
|
|
13 --input_dataset_type $input.metadata.dataset_type
|
|
14 --input_texture "$input_texture"
|
|
15 --input_texture_file_format $input_texture.ext
|
|
16 #if $max_edge_length > 0:
|
|
17 --max_edge_length $max_edge_length
|
|
18 #end if
|
|
19 --output "$output"
|
|
20 --output_vtk_type $output_vtk_type
|
|
21 ]]>
|
|
22 </command>
|
|
23 <inputs>
|
|
24 <param name="input" type="data" format="vtkascii,vtkbinary" label="Shape" help="Format can be vtkascii or vtkbinary." />
|
|
25 <param name="input_texture" type="data" format="jpg,png" label="Texture image" help="Format can be jpg or png." />
|
|
26 <param name="max_edge_length" type="float" value="0.0" optional="True" label="Maximum edge length" help="Optionally refine shape by restricting edges to this length (zero value results in no refinement).">
|
|
27 <validator type="in_range" min="0" exclude_min="true" />
|
|
28 </param>
|
|
29 <expand macro="output_vtk_type_params" />
|
|
30 </inputs>
|
|
31 <outputs>
|
|
32 <data name="output" format="vtkascii">
|
|
33 <actions>
|
|
34 <action type="format">
|
|
35 <option type="from_param" name="output_vtk_type" />
|
|
36 </action>
|
|
37 </actions>
|
|
38 </data>
|
|
39 </outputs>
|
|
40 <tests>
|
|
41 <test>
|
|
42 <param name="input" value="shaft.vtkascii" ftype="vtkascii" />
|
|
43 <param name="input_file_format_and_type" value="vtkascii" />
|
|
44 <param name="input_dataset_type" value="POLYDATA" />
|
|
45 <param name="input_texture" value="sandstone.jpg" ftype="jpg" />
|
|
46 <param name="max_edge_length" value="0.1" />
|
|
47 <output name="output" file="shaft_with_texture.vtkascii" ftype="vtkascii" />
|
|
48 <param name="output_vtk_type" value="vtkascii" />
|
|
49 </test>
|
|
50 </tests>
|
|
51 <help>
|
|
52 **What it does**
|
|
53
|
|
54 Adds a texture by applying an image to the surface of a shape. The shape is projected onto a bounding box
|
|
55 and the color is selected by flattening the box to fit the image. Refinement can be applied for a smoother
|
|
56 result.
|
|
57
|
|
58 * **Shape** - Shape for applying a surface texture.
|
|
59 * **Maximum edge length** - The shape's edges are smoothed by adding points to its edges that are longer than the defined maximum length.
|
|
60 * **Texture image** - Image to be applied to the shape's surface to create the texture.
|
|
61
|
|
62 </help>
|
|
63 <expand macro="citations" />
|
|
64 </tool>
|