Recall that an MLI R is constructed from the
arrays
by inserting after each non-zero value the corresponding intensity
value for that structure, and marking the beginning of each new
pixel. By nature, the
arrays will tend to have islands
of same-valued pixels, and are thus susceptible to a simple run-length
compression scheme. The compressed format we adopted is the sequence
of run-length encoded arrays
followed by the intensity values appended in the order
that they appear in R. Since the higher numbered arrays tend to
begin and end with large runs of background, we found it useful to add
an ``offset'' and ``length'' field before each run-length encoded
plane array, and discard these first and last runs of background.
For decompression, it is a simple matter to reconstruct the original
ordering of structure numbers and placeholders from the
arrays, and then the intensity values can be read and paired
one-to-one with the structure numbers to reconstitute R. In our
sample application, this compression scheme resulted in an
approximately 3:1 compression ratio; more sophisticated strategies
could probably improve this.