RCODE_IDENT

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
AUTHOR
SEE ALSO

NAME

rcode_ident - store identifiers in an indexed map and retrieve from same

SYNOPSIS

rcode_ident [ -8 | -16 | -24 ][ -h ][ -tS ][ -x xr -y yr ] [ input.txt [output.idx] ]
rcode_ident -r
[ -i ][ -u ][ -h ][ -H ][ -l ][ -n ][ -tS ] input.idx [output.txt]

DESCRIPTION

Rcode_ident takes a list of ASCII identifiers on the input and encodes them as a 16-bit index to a table appended to the output. This default index size can hold up to 65 thousand unique IDs, which is suitable for most applications. The -8 option may be used to specify an 8-bit index, which saves space if 256 or fewer unique identifiers appear on the input. The -24 option creates a 24-bit index that can record over 16 million unique identifiers.

Identifiers are separated by newlines by default, but any single-character separator may be given with the -tS option. Note there is no space between this option and its argument. Leading and trailing white space is eliminated from each identifier, and the maximum ID length is 255 characters.

Input is taken from the first named file, or standard input if no files are given. (Input file is required for -r option.) Output is sent to the second named file, or standard output if none.

The -h option tells rcode_ident not to expect an information header on its input. The -x and -y options give the horizontal and vertical map dimensions, respectively. If these are not specified, then a resolution string must be included on the header, as produced by rtrace(1) when both resolutions are specified.

The second form applies the -r option to read an indexed id file and produce the original identifiers for each pixel position on the output. With this option, the ID file must be given on the command line and cannot be read from the standard input. The -h and -H options may be used to leave off the header and resolution string, respectively. The -tS option specifies an alternate ID separator instead of the default newline. The -l option tells rcode_ident to list identifiers following the header information (if present). The -n option prints identifier table indexes rather than the strings themselves. Indexing starts from 0 for the first table entry.

When decoding, the -i option tells rcode_ident to produce an identifier for each integer input pair specifying the horizontal and vertical coordinates of a particular pixel, where x is measured from 0 on the left and y from 0 at the bottom in the standard orientation. If the -u option is also given, output will be flushed after each identifier

EXAMPLES

To store modifier IDs out of rtrace:

rtrace -ffa < rays.flt -x 512 -y 400 -om octree | rcode_ident > mods.idx

To query specific modifiers using ximage with the ’t’ command:

ximage -op render.hdr | rcode_ident -i -r mods.idx

To only print out the list of unique identifiers:

rcode_ident -r -h -H -i -l mods.idx < /dev/null

AUTHOR

Greg Ward

SEE ALSO

rcalc(1), rcode_depth(1), rcode_norm(1), rcode2bmp(1), rlam(1), rsplit(1), rtpict(1)