# Reload me!
SEGMENTATION FILE FORMAT
David Martin
8/2/2001
This document describes the segmentation file format. Segmentation
files end in ".seg".
The overall structure of the file is as follows:
data
The first part of the file is the header. The header is ascii text,
and can contain comments. The comment character is '#'. The header
is separated from the data with a line containing the literal text
"data".
The header can contain the following information, in any order:
format {*ascii|binary} {*cr|map}
date
image # image ID number
user # user ID number
width # width of image
height # height of image
segments # number of segments
gray {*0|1} # image presented in grayscale?
invert {*0|1} # image presented with pixel values inverted?
flipflop {*0|1} # image presented upside-down and backwards?
The {width,height,segments} lines are required. All others lines are
optional. Default values are marked with a '*'.
The format line describes the format of the data section of the file.
The default and recommended format is 'ascii cr' (cr = compressed
row). This document does not describe the other formats, as they are
probably superfluous.
The 'ascii cr' format is designed to be very easy to parse; it is not
optimized for space. Use gzip if you want smaller files! Each line
in the data section contains 4 integers:
All values start counting at 0. is the segment number; is the
row; and are column numbers. The line means that columns
[..] of row belong to segment . Lines of this sort can
appear in any order, and can be reordered without harm. The only
restriction is that each pixel must be named exactly once.
END