vicar_fmt

advertisement
[This document represents the personal views of
as such does not represent an official document
Propulsion Laboratory, the California Institute
National Aeronautics and Space Administration.
as to the accuracy of the information disclosed
suitability for any given purpose.]
a single individual, and
or position of the Jet
of Technology, or the
No guarantees are made
herein, nor to its
VICAR (Video Image Communication and Retrieval) is a collection of image
processing programs supported by the Multimission Image Processing
Laboratory (MIPL) at the Jet Propulsion Laboratory (JPL), for use
in manipulating and analyzing spacecraft images. The image format
used by VICAR programs is referred to as VICAR format. More recently,
the Planetary Data System (PDS) has been responsible for archiving
space mission data on CD-ROM media, using its own self-describing
data format, variously know as PDS or SFDU (Standard Formatted Data
Unit). At least some of the current projects (e.g. Magellan,
Galileo) are using the PDS format as a "pointer" to detached VICARformat imagery. The PDS format is described in another document.
VICAR images consist of an image label, followed by optional binary
headers, followed by image data, followed by optional EOL labels. A
depiction of the image format follows:
------------------------------------------------------------------------|
VICAR LABEL
|
|
|
------------------------------------------------------------------------|
BINARY HEADER(s) (optional)
|
|
|
------------------------------------------------------------------------|
|
|
|
|
|
| BINARY
|
IMAGE DATA
|
| PREFIX
|
|
| (optional)
|
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------|
EOL LABELS (optional)
|
|
|
------------------------------------------------------------------------The VICAR image label is a header which contains information about the
image data format, and optionally of the image data itself and a
processing history. The label is an ASCII string consisting of blankseparated label items, each of which has a keyword and a value
separated by an equal sign (=). The image label is artificially
broken up into a 'system' label and a 'history' label. The intent
is that the system label items describe the image format, and all
other label items describe either the data or the processing history.
As such, only the so-called system label items are necessary to
read the image data, and only those items have more or less guaranteed
definitions or formats.
The values associated with a keyword can take one of two types-string or numeric. Numeric values are simply the ASCII representation,
e.g. LBLSIZE=1024. String values are enclosed in double-quotes, e.g.
FORMAT="BYTE".
Following is a list of system label keywords, their data type, a brief
description, and where applicable and/or available, a best-guess list of
allowable values. As far as I know, the LBLSIZE item is always first,
and serves to identify a VICAR image. The rest of the items aren't
necessarily in any particular order, except perhaps by convention. Also
note that all these items will not necessarily be found in any given
VICAR image, especially in images created before about 1990.
[Most of the following information was taken from a Galileo SSI
PDS CD-ROM disk.]
LBLSIZE
FORMAT
Numeric
String
Size of the label in bytes
Data format
BYTE - 8-bit unsigned integer
HALF - 16-bit signed integer (can be WORD)
FULL - 32-bit signed integer (can be LONG)
REAL - 32-bit floating point (VAX format
default)
DOUB - 64-bit floating point (VAX format
default)
COMP - 64-bit complex number (VAX format
default)
TYPE
etc.)
String
Data set type (image, parameter, histogram, plot,
BUFSIZ
input/output
DIM
EOL
Numeric
Numeric
Numeric
RECSIZE
ORG
Numeric
String
NL
NS
NB
NBB
NLB
N1
N2
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
Numeric
N3
N4
HOST
Numeric
Numeric
String
INTFMT
String
REALFMT
String
BHOST
String
IMAGE
PARAM
TABLE
Internal
- a standard image file
- a VICAR parameter file (also PARM)
- tabular file (e.g. pseudocolor table)
blocksize VICAR will use during
Data set dimension, e.g. 2, 3
End-of-dataset label (I've never seen this used)
0 - NO EOL labels present
1 - EOL labels present
Data set record size, in eight-bit bytes
Data set organization:
BSQ - Band Sequential
BIL - Band Interleaved by Line
BIP - Band Interleaved by Pixel
Number of lines (data records)
Number of samples
Number of bands or number of data planes
Number of per-record binary prefix bytes
Number of binary header records
Equivalent to NS
Equivalent to NL for BSQ, NB for BIL and NS for
BIP
BINTFMT
values
String
Equivalent to NB for BSQ, NL for BIL and BIP
(I've only seen this with a numeric value of 0.)
Type of computer used to generate the image, e.g.
DECSTATN
SUN-3
SUN-4
VAX-VMS (default)
Format used to represent integers in the file.
HIGH - high byte first (big-endian)
LOW - low byte first (little-endian)
Format used to represent floating numbers.
IEEE - IEEE-754 format, high-order bytes first
RIEEE - IEEE-754 format, low-order bytes first
VAX - VAX format
Type of computer used to generate the binary
information (same values as for HOST).
Format used to represent binary label integer
BREALFMT
point
String
(same values as for INTFMT).
Format used to represent binary label floatingvalues (same values as for REALFMT).
A few additional explanatory notes:
The size of the label (LBLSIZE keyword) - In most images generated by
VICAR software, the size of the label is an integer multiple of the
size of each line (record) in the image. In other words, if an
image
has 1024 8-bit bytes and the ASCII label consists of 1025 bytes of
information, the size of the label would be 2048 bytes (with 1023
bytes of random padding added after the actual information). I've
always assumed there would be at least one trailing ASCII NUL
character
at the end of the useful ASCII label information. Also, there
seems to
be a convention that the LBLSIZE keyword and its corresponding
value
take up the first 24 bytes of the header, in a left-justified
blankfilled format.
Binary prefix bytes (NBB keyword) - binary prefix bytes are generally
used for spacecraft- or mission-specific information that pertains
to individual lines, e.g. bad data locations. The format of the
information is also mission-specific, so you have to have access to
JPL memos in order to know what they contain. The number given as
the value of the NBB keyword is the number of 8-bit bytes prepended
to each line (record) of the image data. For example, if an image
label specified NS=800, FORMAT=REAL, and NBB=100, each record
(line)
of the image data would be 3300 8-bit bytes long, that is, 800
bytes/line times 4 bytes/sample plus 100 binary bytes/line.
Binary labels (NLB keyword) - binary labels are generally used for
spacecraft- or mission-specific information that relates to the
entire image, e.g. calibration information. Again, the format of
the information is mission-specific, so you have to have access to
JPL memos to get a content description. Each label is the same
length as a single record/line, e.g. in an image with FORMAT=HALF,
NS=800, NBB=200, and NLB=2, the number of bytes of binary record
information located between the ASCII image label and the start of
the image data would be 3600 bytes, that is, 800 samples/line times
2 bytes/sample, plus 200 binary bytes/line, times two binary
labels.
A word on compressed images - some of the CD-ROM disks released to
date (e.g. Voyager disks) contain compressed imagery. These
compressed
image files can be identified by having filename extensions of
either
IMQ or IBQ. Generally, decompression source code and executables
for a
variety of computers can be found on the CD-ROM volumes. A
description
of the compression algorithm used is beyond the scope of this
document.
Here's an example of the contents of a Galileo SSI VICAR image label
(from
the file called 1500r.img). For readability, I've added a line break
after
each label item. The line breaks do not appear in the actual label,
rather,
the items are separated by one or more spaces (ASCII value 32).
LBLSIZE=2000
FORMAT='BYTE'
TYPE='IMAGE'
BUFSIZ=20480
DIM=3
EOL=0
RECSIZE=1000
ORG='BSQ'
NL=800
NS=800
NB=1
N1=800
N2=800
N3=1
N4=0
NBB=200
NLB=7
HOST='VAX-VMS'
INTFMT='LOW'
REALFMT='VAX'
TASK='CATLABEL'
USER='JRY320'
DAT_TIM='Thu Apr 16 17:28:57 1992'
MISSION='GALILEO'
SENSOR='SSI'
PICNO='E1L0588'
PA='E1LSLUNMAP09____LCLR'
PARTITIO=0
RIM=610715
MOD91=0
MOD10=0
MOD8=0
TCA='CLOSEST TIME'
TARGET='MOON'
SCETYEAR=1990
SCETDAY=343
SCETHOUR=4
SCETMIN=59
SCETSEC=50
SCETMSEC=535
FILTER=1
EXP=16.667
GAIN=2
RATE=4
TLMFMT='HIM'
BOOM='N'
FIBE='1000'
BARC='OFF'
TBPPXL=0.0
TPPLNE=0.0
INA=37.7358
EMA=11.0163
PHA=48.6863
HRA=-999.0
TWIST=-97.3831
CONE=0.0
RA=129.963
DEC=27.4752
SUNAZ=180.224
NORAZ=263.978
SCAZ=38.6148
SMRAZ=0.0
SMEAR=-999.0
HSCL=3597.04
VSCL=3597.19
LAT=-8.36521
LON=46.4238
RAD=0.0
PLRANGE=356058.0
SLRANGE=354321.0
SOLRANGE=7.779091e+08
TASK='BADLABEL'
USER='LAW320'
DAT_TIM='Fri May 1 18:46:06 1992'
REDR_EXT='2'
ENTROPY=1.96081
TASK='GLLFILLI'
USER='LAW320'
DAT_TIM='Fri May 1 18:46:24 1992'
RSOVF=0
TASK='COPY'
USER='LAW320'
DAT_TIM='Fri May 1 18:47:31 1992'
Download