comparison icqsol_add_texture.xml @ 0:26440148d313 draft default tip

Uploaded
author iuc
date Tue, 23 Aug 2016 14:12:03 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:26440148d313
1 <?xml version='1.0' encoding='UTF-8'?>
2 <tool id="icqsol_add_texture" name="Add texture" version="@WRAPPER_VERSION@.0">
3 <description>to shape</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 $refine_shape_cond.refine_shape == "yes":
17 --max_edge_length $refine_shape_cond.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 <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.1" label="Maximum edge length" help="Refine shape by restricting edges to this length.">
34 <validator type="in_range" min="0" exclude_min="true" />
35 </param>
36 </when>
37 </conditional>
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" />
55 <param name="refine_shape" value="yes" />
56 <param name="max_edge_length" value="0.1" />
57 <output name="output" file="shaft_with_texture.vtkascii" ftype="vtkascii" />
58 <param name="output_vtk_type" value="vtkascii" />
59 </test>
60 </tests>
61 <help>
62 **What it does**
63
64 Adds a texture by applying an image to the surface of a shape. The shape is projected onto a bounding box
65 and the color is selected by flattening the box to fit the image. Refinement can be applied for a smoother
66 result.
67
68 * **Shape** - Shape for applying a surface texture.
69 * **Maximum edge length** - The shape's edges are smoothed by adding points to its edges that are longer than the defined maximum length.
70 * **Texture image** - Image to be applied to the shape's surface to create the texture.
71
72 </help>
73 <expand macro="citations" />
74 </tool>