0
|
1 <?xml version='1.0' encoding='UTF-8'?>
|
2
|
2 <tool id="icqsol_add_texture" name="Add texture" version="@WRAPPER_VERSION@.0">
|
|
3 <description>to shape</description>
|
0
|
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
|
1
|
16 #if $refine_shape_cond.refine_shape == "yes":
|
|
17 --max_edge_length $refine_shape_cond.max_edge_length
|
0
|
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." />
|
1
|
26 <conditional name="refine_shape_cond">
|
|
27 <param name="refine_shape" type="select" label="Refine shape?" help="Points will be added to the shape's edges restricting their length to the maximum.">
|
|
28 <option value="no" selected="True">No</option>
|
|
29 <option value="yes">Yes</option>
|
|
30 </param>
|
|
31 <when value="no" />
|
|
32 <when value="yes">
|
|
33 <param name="max_edge_length" type="float" value="0" label="Maximum edge length" help="Refine shape by restricting edges to this length (zero value results in no refinement).">
|
|
34 <validator type="in_range" min="0" exclude_min="true" />
|
|
35 </param>
|
|
36 </when>
|
|
37 </conditional>
|
0
|
38 <expand macro="output_vtk_type_params" />
|
|
39 </inputs>
|
|
40 <outputs>
|
|
41 <data name="output" format="vtkascii">
|
|
42 <actions>
|
|
43 <action type="format">
|
|
44 <option type="from_param" name="output_vtk_type" />
|
|
45 </action>
|
|
46 </actions>
|
|
47 </data>
|
|
48 </outputs>
|
|
49 <tests>
|
|
50 <test>
|
|
51 <param name="input" value="shaft.vtkascii" ftype="vtkascii" />
|
|
52 <param name="input_file_format_and_type" value="vtkascii" />
|
|
53 <param name="input_dataset_type" value="POLYDATA" />
|
|
54 <param name="input_texture" value="sandstone.jpg" ftype="jpg" />
|
|
55 <param name="max_edge_length" value="0.1" />
|
|
56 <output name="output" file="shaft_with_texture.vtkascii" ftype="vtkascii" />
|
|
57 <param name="output_vtk_type" value="vtkascii" />
|
|
58 </test>
|
|
59 </tests>
|
|
60 <help>
|
|
61 **What it does**
|
|
62
|
|
63 Adds a texture by applying an image to the surface of a shape. The shape is projected onto a bounding box
|
|
64 and the color is selected by flattening the box to fit the image. Refinement can be applied for a smoother
|
|
65 result.
|
|
66
|
|
67 * **Shape** - Shape for applying a surface texture.
|
|
68 * **Maximum edge length** - The shape's edges are smoothed by adding points to its edges that are longer than the defined maximum length.
|
|
69 * **Texture image** - Image to be applied to the shape's surface to create the texture.
|
|
70
|
|
71 </help>
|
|
72 <expand macro="citations" />
|
|
73 </tool>
|