GETINFO

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
AUTHOR
SEE ALSO

NAME

getinfo - get header information from a RADIANCE file

SYNOPSIS

getinfo [ -d | +d ][ file .. ]
getinfo
[ -d ] -
getinfo
{ -a | -r } info_line1 ..
getinfo
[ -d | +d ] -c command ..

DESCRIPTION

Getinfo reads the header of each RADIANCE file and writes it to the standard output. Octree and picture files are in a binary format, which makes it difficult to determine their content. Therefore, a few lines of text are placed at the beginning of each file by the RADIANCE program that creates it. The end of the header information and the start of the data is indicated by an empty line. The -d option can be used to print the dimensions of an octree or picture file instead. For an octree, getinfo -d prints the bounding cube (xmin ymin zmin size). For a picture, getinfo -d prints the y and x resolution (-Y yres +X xres). The +d option prints the header followed by a newline and the dimensions. If no file is given, the standard input is read.

The second form of getinfo with a hyphen simply removes the header and copies the body of the file from the standard input to the standard output. If the -d option is given, then the resolution string will be elided as well.

The third form of getinfo -a adds one or more header lines to the standard input. These lines are given as arguments to getinfo, and must be quoted if they contain spaces. The alternative form with -r replaces any previous occurances of the settings in the given line(s) with nothing if there is only one word, or with the whole line if quoted and containing interior white space or an equals sign (’=’). Any leading white space matches any leading number of spaces and tabs in the input header.

The fourth form of getinfo -c is followed by a command and its arguments, which is executed on the data segment of the standard input. The header is passed along, with the addition of the command at the end. This is roughly equivalent to the following sequence, but does not require the input to be in a file:

( getinfo < input ; getinfo - < input | command .. )

If the +d option is given with -c, then the resolution string will be copied before the command is called. If the -d option is given, then the resolution string is read in but not copied.

EXAMPLES

To print the header information from scene1.oct and scene2.hdr:

getinfo scene1.oct scene2.hdr

To print the dimensions of a set of pictures:

getinfo -d *.hdr

To add two header lines modifying the view and exposure calibration of a picture:

getinfo -a "VIEW= -vta -vh 180 -vv 180" "EXPOSURE=1.5" < orig.hdr > modified.hdr

To remove any indented lines containing "EXPOSURE=" and replace any left-justified "EXPOSURE=" lines with a single value of 16:

getinfo -r " EXPOSURE=" "EXPOSURE=16" < orig.hdr > fixed.hdr

To raise floating-point matrix elements to a power of 2.7:

getinfo -c rcalc -if -of -e ’$1=$1^2.7’ < input.fmx > output.fmx

AUTHOR

Greg Ward

SEE ALSO

oconv(1), pfilt(1), rcalc(1), rhinfo(1), rpict(1), rsplit(1), rtrace(1), rvu(1)