view icqsol_add_texture.xml @ 0:4afbbfafc3c2 draft

Uploaded
author greg
date Wed, 09 Dec 2015 11:07:55 -0500
parents
children 0a94307d301c
line wrap: on
line source

<?xml version='1.0' encoding='UTF-8'?>
<tool id="icqsol_add_texture" name="Add texture image" version="@WRAPPER_VERSION@.0">
    <description>to a shape surface</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 $max_edge_length > 0:
        --max_edge_length $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." />
        <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).">
            <validator type="in_range" min="0" exclude_min="true" />
        </param>
        <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" ftype="jpg" />
            <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>