next up previous
Next: Discussion Up: Multilayer Images Previous: Rendering MLIs

Compressing MLIs


Recall that an MLI R is constructed from the tex2html_wrap_inline643 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 tex2html_wrap_inline645 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 tex2html_wrap_inline647 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 tex2html_wrap_inline651 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.

Chris Umans
Sun Sep 7 15:06:59 PDT 1997