Mercurial > repos > iuc > icqsol_add_texture
diff icqsol_add_texture.xml @ 0:26440148d313 draft default tip
Uploaded
| author | iuc |
|---|---|
| date | Tue, 23 Aug 2016 14:12:03 -0400 |
| parents | |
| children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icqsol_add_texture.xml Tue Aug 23 14:12:03 2016 -0400 @@ -0,0 +1,74 @@ +<?xml version='1.0' encoding='UTF-8'?> +<tool id="icqsol_add_texture" name="Add texture" version="@WRAPPER_VERSION@.0"> + <description>to shape</description> + <macros> + <import>icqsol_macros.xml</import> + </macros> + <expand macro="requirements" /> + <command> + <![CDATA[ + python $__tool_directory__/icqsol_add_texture.py + --input "$input" + --input_file_format_and_type $input.ext + --input_dataset_type $input.metadata.dataset_type + --input_texture "$input_texture" + --input_texture_file_format $input_texture.ext + #if $refine_shape_cond.refine_shape == "yes": + --max_edge_length $refine_shape_cond.max_edge_length + #end if + --output "$output" + --output_vtk_type $output_vtk_type + ]]> + </command> + <inputs> + <param name="input" type="data" format="vtkascii,vtkbinary" label="Shape" help="Format can be vtkascii or vtkbinary." /> + <param name="input_texture" type="data" format="jpg,png" label="Texture image" help="Format can be jpg or png." /> + <conditional name="refine_shape_cond"> + <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."> + <option value="no" selected="True">No</option> + <option value="yes">Yes</option> + </param> + <when value="no" /> + <when value="yes"> + <param name="max_edge_length" type="float" value="0.1" label="Maximum edge length" help="Refine shape by restricting edges to this length."> + <validator type="in_range" min="0" exclude_min="true" /> + </param> + </when> + </conditional> + <expand macro="output_vtk_type_params" /> + </inputs> + <outputs> + <data name="output" format="vtkascii"> + <actions> + <action type="format"> + <option type="from_param" name="output_vtk_type" /> + </action> + </actions> + </data> + </outputs> + <tests> + <test> + <param name="input" value="shaft.vtkascii" ftype="vtkascii" /> + <param name="input_file_format_and_type" value="vtkascii" /> + <param name="input_dataset_type" value="POLYDATA" /> + <param name="input_texture" value="sandstone.jpg" /> + <param name="refine_shape" value="yes" /> + <param name="max_edge_length" value="0.1" /> + <output name="output" file="shaft_with_texture.vtkascii" ftype="vtkascii" /> + <param name="output_vtk_type" value="vtkascii" /> + </test> + </tests> + <help> +**What it does** + +Adds a texture by applying an image to the surface of a shape. The shape is projected onto a bounding box +and the color is selected by flattening the box to fit the image. Refinement can be applied for a smoother +result. + +* **Shape** - Shape for applying a surface texture. +* **Maximum edge length** - The shape's edges are smoothed by adding points to its edges that are longer than the defined maximum length. +* **Texture image** - Image to be applied to the shape's surface to create the texture. + + </help> + <expand macro="citations" /> +</tool>
