DATAMANIP commands


PROGRAM NAME

kformats - Conversion Between the Formats Supported in Khoros 2

DESCRIPTION

kformats converts between formats internally supported by Khoros 2.0. Currently, these formats include

ASCII Format

AVS - Application Visualization System (AVS) Format

PNM - Portable Any Map The PBM image file format describes the format used by the pbm conversion routines. The format was developed by Jef Poskanzer. The PNM format is really three different formats; PBM, PGM, & PPM. The formats correspond to bitmap, greymap, and pixmap formats.

Raw (headerless) Format

Sun Raster - Sun Rasterfile File Format
The Sun Raster file format describes the format used by the Sun Rasterfile File Format conversion routines. The format was developed by Sun Microsystems.

KDF - Khoros 2.0 Data File Format

XBM - X Bitmap Format

VIFF - Khoros Visualization/Image File Format (Khoros 1.0) A Khoros Viff data file is organized as a 1Kbyte header followed by additional information. The first two bytes of the header tell what kind of stuff the additional information is. For Khoros image files, the additional information consists of the maps, the location data, and then the image or vector data.

XWD - X Window Dump Format

XPM - X Pixmap Format

User Specified Supported Format This string entry allows the user to enter a supported format that is not available in the list of formats described above. The string is passed directly into the data services call that sets the format attribute on the data object, so it must be accurate.

Importing Other Formats We have not forgotten about other formats, such as TGA, FITS, and TIFF; they are on the list of many to add to Khoros. Khoros 2 is designed to be portable, therefore we made the decision that each format that we bring on line should be implemented as a portable solution. (Otherwise we end up with a software management nightmare.) As a workaround until these other formats come on line, we recommend using an intermediate converter. For example, the TIFF workaround would be to get the PBMPLUS package, which has a TIFF reader in it. Use tiff2pbm to convert your TIFF to a PBM image, which can then be read directly without further conversion by any Khoros 2 program.

Postscript Output For postscript output, use the ipostscr operator in the Image toolbox. The object is located under "Input/Output - Hardcopy Output - Postscript" in cantata.

Format Restrictions With the exception of the KDF format, each format is only capable of storing a subset of the polymorphic data model. For example, no format except KDF will be able to store the Time segment. User defined attributes, as well, typically will be lost. Furthermore, even though all formats can store the Value segment, each format has its own restrictions on the data type and dimensionality that can be stored. Floating point and complex data will typically be lost. This routine will print out some indication of what is being lost when a conversion is performed.

REQUIRED ARGUMENTS

-i
type: infile
desc: Input data object
-o
type: outfile
desc: Resulting output data object

Mutually Exclusive Group; you must specify ONE of:

-ascii
type: flag
desc: Output in ASCII format
OR
-kdf
type: flag
desc: Output as KDF (Khoros 2.0 Format)
OR
-avs
type: flag
desc: Output in Application Visualization System (AVS) format
OR
-xbm
type: flag
desc: Output in X Bitmap (XBM) format
OR
-arf
type: flag
desc: Output in ARF Format
OR
-viff
type: flag
desc: Output as Viff (Khoros 1.0 Image Format)
OR
-pnm
type: flag
desc: Output in Portable Any Map (PNM) format
OR
-xwd
type: flag
desc: Output in X Window Dump (XWD) format
OR
-raw
type: flag
desc: Output in Raw (headerless) format
OR
-xpm
type: flag
desc: Output in X Pixmap (XPM) format
OR
-rast
type: flag
desc: Output in Sun Raster format
OR
-format
type: string
desc: Supported format not available via the format flags
default: {none}

OPTIONAL ARGUMENTS

none

EXAMPLES

SEE ALSO

IMAGE::ipostscr(1)

RESTRICTIONS

If the input data cannot be represented on the output format, kformats will- Conversion Between Khoros 2.0 Supported Formats fail.

REFERENCES

COPYRIGHT

Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.