asciitf2vtf - Convert an ASCII description of a Lookup Transfer table to VAPOR's vtf format
asciitf2vtf [options] vtffile
asciitf2vtf is a translator for converting an ASACII representation of a color and opacity transfer funciton into VAPOR's .vtf format. The resulting .vtf file may be loaded into a VAPOR session. The ASCII transfer function files input into asciitf2vf are whitespace-separted lists of n-tuples of floating point values. The first element of each tuple specifies the data value that the opacity or color will be mapped to. The domain of the first tuple element is the set of real numbers, but most typically set to the user data domain. The remaining tuple elements specify opacity or color values in the normalized range [0.0..1.0].
The translated file is written to the path specified by vtffile.
Path to an ASCII file containing a color transfer function description. Presently only the Hue-Saturation-Value (HSV) color model is supported: each tuple is of the form (D, H, S, V), where D is the data value, H is the normalized hue, S is normalized color saturation, and V is normalized color value.
Path to an ASCII file containing an opacity transfer function description. Each tuple is of the form (D, O), where D is the data value and O is the normalized opacity: a value of 0.0 is fully transparent, and a value of 1.0 is fully opaque.
Print a help message and then exit.
To create a linear opacity ramp with a fully transparent opacity at the data value 0.0 and a fully opaque opacity at the data value 100.0, an ASCII opacity transfer function file named "opacity.txt" would contain:
0.0 0.0
100.0 1.0
To convert opacity.txt to a .vtf file named "map.vtf", the following invocation would be used:
asciitf2vtf -omap opacity.txt map.vtf
If in addition to an opacity transfer function a color transfer function is to be included that linearly ramps the Hue from 0 to 360 degrees, and has constant, full saturation and value, an ASCII transfer function file named "color.txt" would contain:
0.0 0.0 1.0 1.0
100.0 1.0 1.0 1.0
Note that all HSV elements are normalized. The following invocation would be used to convert both opacity and color transfer function files:
asciitf2vtf -cmap color.txt -omap opacity.txt map.vtf
Last updated on $Date$