Arch/Cmprss Lore

Arch/Cmprss Information and History

Back in the fall of 1994, with massive health care budget cutbacks being implemented, one of our nuclear medicine radiologists, Mike Hoskinson asked me to write a small utility to compress nuclear medicine studies archived to 650 MB optical disks. Since a typical study can occupy as much as 4 MB (128x128x120 projections), and with optical disks being rather expensive, the ability to compress archived studies would result in a major $ saving.

Being quite heavy into research on my thesis at the time, it was November before I got a chance to get around to it. I took half a day, taught myself the essentials of sh shell programming, and made up a simple little shell script that would take a list of directories and compress all the patient files in it using the unix compress(1) command. As we all know, nuclear medicine images consist mostly of empty space, which makes them highly compressible. Experiments indicated that a compression ratio of between 60-80% could be achieved with most studies, and up to 90% in some cases.

There was just one problem. It was totally incompatible with the workbench and clinical index. The files couldn't be accessed from the workbench, and if you tried to rebuild the clinical index, the compressed files seemed to disappear from the disk. It occurred to me that the PRISM's cibuild and workbench probably took a peek into the IIB of each file. However, I didn't have a lot of time to delve too deeply into it to figure it out. Despite the initial problems, I decided to throw it out onto the Net via the PNUG mailing list. The initial response seemed favourable, but the script still needed a lot of work.

A short time later, Wes Wooten at the St. Agnes Medical Center in Fresno, CA, mailed me a modification to the script. It was quite clever, and the key innovation to making the script useful. Quite simply, the idea was to make a copy of the IIB header, compress the file and re-attach the IIB header to the file so the workbench and clinical index utilities could access the information it wanted. This key innovation was implemented using the dd(1) unix routine.

And after this was released, the popularity of the arch script exploded. And as far as I know, our department hasn't purchased any new optical disks in the 7 or 8 months we've been using the script.

After this, there was some minor tweaking. I added an option to allow the script to compress individual files rather than compressing everything in the directory. Small changes were also made to reduce the possibility of data loss in the rare event of a crash while the script was running.

The next innovation came just recently, in June 1995. The arch script became part of the workbench. This enhancement was something I'd been wanting to do for quite some time, but didn't have much time to work on until then. I wrote a simple little wrapper program in C that would take the files on the workbench and pass them to the arch script. There were some bugs, but I mailed it off to Wes to see what he thought. To my surprise, I discovered he had written his own front end using widgets and everything. Mine just worked off two workbench menu items. I had a look and tried it out on my systems to much success.

So now there were two versions of the arch script (Wes had also modified my original script) and a front end. To avoid confusion, Wes suggested the two versions be merged and thrown out onto the Net. And thus cmprss was born, incorporating some of Wes' later modifications to arch (namely compression blocking on certain disks) and his front end.

By this time, Picker had released the PRISM Baseline 6 software incorporating Motif widgets. As a result, there are two versions of the cmprss front end, one using the standard Xt/HP widgets, and another using the Motif widgets

Now that you've read all this, you can go on to find out more about the script and front end as they currently exist.

----------

Eugene Mah's home page
U of A Radiology home page


Eugene Mah eugene@raddi.uah.ualberta.ca
Last modified: Thu Nov 2 16:48:09 MST 1995