next up previous 393
Next: UNF2NDF - Converts a sequential unformatted file to an NDF
Up: Specifications of CONVERT Applications
Previous: SPECX2NDF - Converts a SPECX map into a simple data cube, or SPECX data files to individual spectra.


TIFF2NDF - Converts a TIFF file into an NDF.

Description:
This Bourne-shell script converts a 256 grey-level or black-and-white dithered Tag Image File Format (TIFF) into an unsigned-byte NDF file. It handles one- or two-dimensional images. The script uses various NETPBM utilities to produce a FITS file, flipped top to bottom, and then FITS2NDF to produce the final NDF. Error messages are converted into Starlink style (preceded by !).

Usage:
tiff2ndf in [out]

Parameters:

IN = FILENAME (Read)
The name of the TIFF file to be converted. (A .tif name extension is assumed if omitted.)
OUT = NDF (Write)
The name of the NDF to be generated (without the .sdf extension). If this is omitted, the value of the IN parameter is used.

Examples:

tiff2ndf old new
This converts the TIFF file old.tif into an NDF called new (in file new.sdf).

tiff2ndf horse
This converts the TIFF file horse.tif into an NDF called horse (in file horse.sdf).

Notes:
The following points should be remembered:
  • This initial version of the script handles only greyscale or b/w dithered images. You are responsible for conversion of your images to this format prior to use, including the conversion of RGB values to brightness values.

  • Input image file names must have the extension .tif.

  • The NETPBM utilities tifftopnm, ppmtopgm, pnmflip and pnmtofits must be available on your PATH.

Related Applications :
CONVERT: NDF2TIFF.



next up previous 393
Next: UNF2NDF - Converts a sequential unformatted file to an NDF
Up: Specifications of CONVERT Applications
Previous: SPECX2NDF - Converts a SPECX map into a simple data cube, or SPECX data files to individual spectra.

CONVERT A Format-conversion Package
Starlink User Note 55
Malcolm J. Currie
G.J.Privett
A.J.Chipperfield
D.S.Berry
A.C.Davenhall
2008 May 19
E-mail:ussc@star.rl.ac.uk

Copyright © 2005 Council for the Central Laboratory of the Research Councils