Help for VTIFF3O

   VTIFF is a Vicar2 program, which can be used to convert
   between VICAR labeled images and TIFF format files, using
   either scanline (strip) organization, or the newer Revision
   6.0 TIFF tiled-image format. Currently grayscale, image-
   lookup table pairs and RGB tripletes are supported. In addition,
   multiple auxiliary images may be placed in the same file,
   such as "thumbnail" preview images. GeoTIFF 1.0 georeferencing
   parameters may also be inserted for Geographic and Albers.

   Need to add:
     sinusoidal
     utm
     lambert
     polar stereographic

     plus other datums

   "TIFF" is a trademark of Aldus Corporation, and is a public
   standard for platform-independent raster-image storage and
   transmission. It is an acronym for Tagged Image File Format.

CALLING SEQUENCE:

	vtiff-tovic   image.tiff  image 	  AUXIL=(files...)
	vtiff-tovic   image.tiff  (image, lookup) AUXIL=(files...)
	vtiff-tovic   image.tiff  (red, grn, blu) AUXIL=(files...)

	vtiff-fromvic  image  		image.tif  [options..]
	vtiff-fromvic  (image, lookup)  image.tif  [options..]
	vtiff-fromvic  (red, grn, blu)  image.tif  [options..]

   where image.tiff is TIFF format, and lookup is a
   color lookup table in IDX format (1024 sample, 1 line
   byte image, with values r1,g1,b1,0,r2,g2,b2,0,...).


OPERATION

  In the "tovicar" mode, the program unpacks the image and
  lookup table, if desired. It will also unpack any additional
  files and save them as specified by the AUX parameter.

  In the "fromvicar" mode, you have the option of saving the
  files in strip-mode (horizontal scanlines contiguous), which
  makes them TIFF 5.0 compliant; or using the TIFF 6.0 tiling
  option, which breaks the image up into rectangular tiles, and
  saves those in a contiguous manner.

  You may save multiple additional images in the same file using
  the "AUX" parameter. If the file uses a lookup table, you may
  include this in the second INP parameter. It currently must be
  an IDX-format lookup table (1 line x 1024 sample byte image:
  r1,g1,b1,0,r2..). NOTE: Tiling is a new feature, which many
  TIFF programs cant yet handle. If so, use the default strip-mode. 
OPERATION

  You may also chose a TIFF data compression option. The
  currently supported keywords in VTIFF are 'LZW = lempel-ziv-welch
  compression, 'PACKBITS = Macintosh-style packbits (run-length
  encoding) compression, or 'NOCOMP = no compression. NOTE: The
  TIFF 6.0 standard now discourages the use of LZW, as Unisys Corp.
  claims to have a patent on the algorithm, and so may not
  support LZW in the future. If this is a concern, you can try
  the 'ZIP Deflation compression, which does not have any
  limitations.
OPERATION

  The 'JPL compression by default implies the 'ZIPJPL codec, which
  uses a modified ZIP/Deflate compression scheme, allowing for NULL's.
  An optional NULLMASK parameter allows the specification of tiles
  which are all zero, permitting faster,better,cheaper compression
  on those tiles. The NULLMASK file should be an IBIS tabular file 
  containing 0's on those row number corresponding
  to NULL tiles. Use the MASKCOL parameter to specify which column
  contains the NULL information.

  In this version a ('JPL 'NGT) compression is also enabled, 
  supporting National Geographic Television/JPL compression support.
  this mechanism operates in a similar mode to the 'ZIPJPL scheme,
  but is patented and not for general use.
OPERATION

  For RGB triplets, whether tiled or in strips, you may choose
  to organize the data using 'CHUNKY or 'PLANAR interleaving.
  The 'CHUNKY format is analogous to the VICAR BIP (Band-interleaved
  by pixel) organization, and is the default. The 'PLANAR is
  similar to BSQ (Band-sequential) format, and while this permits
  faster conversion and extraction, it is an extension to TIFF
  that is not supported by as many TIFF-compatible programs.
OPERATION

  The latitude-longitude parmeters are extensions to TIFF to
  permit specification of scanned map georeference data. These
  extensions are GeoTIFF 1.0-compliant, and will not interfere with
  any standard TIFF-reading program, which will ignore the 
  extended data fields. For more information on the cartographic
  TIFF extensions, see the GeoTIFF web page, and "HELP PROJ".

  In general, for the most easily exportable TIFF file, use as few
  of the parameters as possible. 


REVISION HISTORY

   Written by:            N. D. Ritter  September 1991
   Cognizant Programmer:  W Bunch

   2003-09-05 WLB Added GeoTIFF support.
   2004-07-12 WLB Added legacy cart tag support.
   2004-10-19 WLB Added support for fourth input TIFF band.
   2004-12-01 WLB Added support for non GeoTIFF metata (to/from TIFF image description tag).
   2005-05-11 WLB Added support for new tags.
   2005-06-01 WLB Bug fix.
   2006-11-21 WLB strcpy/cat and ms_dnum bugs fixed.
   2008-01-03 WLB Switched to USES_ANSI_C AND LIB_CARTO; misc cleanup.
   2016-01-08 WLB Migrated to MIPL; replaced printf with zifmessage.
   2017-02-28 WLB Added support for single-file, multi-band conversion.
   2017-06-02 WLB Removed unnecessary warning messages.
   2017-08-15 WLB Removed DEBUG from imake.

REFERENCES

   "TIFF" Revision 6.0, Final - Jun 3, 1992,
      Aldus Developers Desk, available via anonymous ftp
      through sgi.com.
AKNOWLEDGMENT

   This program is a VICAR front-end to a public-domain
   subroutine library of TIFF file format routines, written
   by Sam Leffler, and extended for JPL use by Niles Ritter.
   The source code carries the following copyright notice:

   <quote>
   Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler
   Copyright (c) 1991, 1992 Silicon Graphics, Inc.
 
   Permission to use, copy, modify, distribute, and sell this software and 
   its documentation for any purpose is hereby granted without fee, provided
   that (i) the above copyright notices and this permission notice appear in
   all copies of the software and related documentation, and (ii) the names of
   Sam Leffler and Silicon Graphics may not be used in any advertising or
   publicity relating to the software without the specific, prior written
   permission of Sam Leffler and Silicon Graphics.
AKNOWLEDGMENT
   
   THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
   EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
   WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
   
   IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
   ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
   OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
   WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
   LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
   OF THIS SOFTWARE.

   <unquote>.


PARAMETERS:


INP

Input TIFF file

OUT

Output VICAR file.

AUXIL

Auxiliary files to pull out of TIFF file.

INFO

Dump information only.

SIZE


SL


SS


NL


NS


METADATA

Dump GeoTIFF to file

STATUS

Print Progress Bar? .SUBCMD FROMVIC Covert from VICAR image to TIFF format file.

INP

Input VICAR file

OUT

Output TIFF file

AUXIL

Auxiliary files to stuff into output TIFF file.

TLINES

Number of lines in tile

TSAMPS

Number of samps in tile

COMPRESS

Compression type

COLORBITS

Convert RGB to 8-bit?

TIFFMODE

Use Strips or Tiles ?

INTRLEAV

Chunky Interleave:rgbrgb...?

LUT

Type of Color Lookup Table to use.

LAT

Ref. Latitude in (D,Min,Sec).

HEMILAT

North or South Latitude ?

LONG

Ref. Longitude in (D,Min,Sec).

HEMILONG

East or West Longitude ?

HDEGPIX

Horiz. (D,Min,Sec) per pixel.

VDEGPIX

Vert. (D,Min,Sec) per pixel.

XPIXPOS

X-Position of Coord. axis.

YPIXPOS

Y-Position of Coord. axis.

RESUNIT

Units used in X/YRES

XRES

#pixels per (RESUNIT) horiz.

YRES

#pixels per (RESUNIT) vert.

GCS

Geog. Coord. System Used

NULLMASK

IBIS table flagging NULL tiles (0 = NULL, 1 = valid data)

MASKCOL

Column containing NULL flag

STATUS

Print Progress Bar?

PROJ

Lat-Long, Albers...?

PIXSIZE

horiz,vert Pixel Size (m)

STDPARAL

Standard Parallels (degrees)

NAT_ORIG

Natural Origin (E,N)

FAL_ORIG

False Origin (E,N)

FO_LAT

False Origin Latitude

NO_LONG

Natural Origin Longitude (aka Central Meridian)

CARTTAG

Include Old Carto tags?

See Examples:


Cognizant Programmer: