vconvert(1)

PROGRAM
vconvert - Convert a Khoros image from one data storage type to another

SYNTAX

vconvert

-i  input image

-o  resulting output image

[-b]
    if true, bands are processed independently

[-t]
    lets user choose output data type:
     'bit' (choose bit data type),
     'byte' (choose byte data type),
     'short' (choose short data type),
     'int' (choose integer data type),
     'float' (choose float data type),
     'complex' (choose complex data type),
     'double' (choose double data type),
      or 'dcomplex' (choose double data type)
       [default = byte]

[-n]
    specifies normalization value
    -OR-

[-s]
    specifies scale factor

[-V]
    Gives the version for vconvert

[-U]
    Gives the usage for vconvert

[-P]
    Prompts for command line options

[-A [file1]]
    Creates the answer file called vconvert.ans or file1

[-a [file1]]
    Uses vconvert.ans or file1 as the answer file

DESCRIPTION
vconvert performs data storage type conversions from any VIFF type to any other, with the exception of the transform types. Scaling or (mutually exclusive) normalization can be performed if requested. The scaling and normalization options are important for controlling the loss of precision when converting from a higher data type to a lower data type.

Output data storage type BYTE is a special case. If scaling is requested, then the input image is scaled, and then clipped to the range [0..255] before output. If normalization is requested, the data is offset adjusted and scaled to map onto the range [0..255] before output.

Normalization for other output types simply scales the data so that the most positive data value is equal to the normalization target. No offset adjustment is performed. If the most positive value in the image is zero then a zero valued image of the desired data type will be produced.

When converting from type BIT to type BYTE, the output values will be 0 or 255 depending on whether the bit corresponding to the input pixel is 0 or 1. For conversions from BIT to any type other than BYTE, the output value receives either 0 or 1 depending on the input bit value. This was done so that an BYTE image would be displayable immediately after conversion from type BIT.

Use of the -b option is important when trying to normalize a multiband or vector image. If -b false is used, then the largest value of any vector component in the image is used to compute the normalization multiplier. If -b true is used, then a different normalization multiplier is used for each band, as dictated by the data in that band.

REQUIRED ARGUMENTS

-i  type: infile
    desc: input image

-o  type: outfile
    desc: resulting output image

OPTIONAL ARGUMENTS

-b  type: boolean
    desc: if true, bands are processed independently
    default: false

-t  type: string
    desc: lets user choose output data type
    allowed values:
     'bit' (choose bit data type),
     'byte' (choose byte data type),
     'short' (choose short data type),
     'int' (choose integer data type),
     'float' (choose float data type),
     'complex' (choose complex data type),
     'double' (choose double data type),
      or 'dcomplex' (choose double data type)

*** These arguments are MUTUALLY EXCLUSIVE ***
 If desired, you may provide ONE AND ONLY ONE of:

-n  desc: specifies normalization value
    default: 255
    bounds: value > 0.0

-s  desc: specifies scale factor
    default: 1
    bounds: no range checking
    ********

EXAMPLES
vconvert -i feath.xv -s 3.14 -t float -o blah.xv

multiplies "feath.xv" by pi then outputs it as a VFF_TYP_FLOAT image.

SEE ALSO
intro(1), verror(3), vgparms(3), vutils(3), lvconvert(3) vscale(1), vnormal(1)

RESTRICTIONS
There needs to be a way to specify the conversion from a COMPLEX type to a non-COMPLEX type to be either the real part or the magnitude (the current version does the real part only).

COPYRIGHT
Copyright 1992, University of New Mexico. All rights reserved.