QSH: a minimal but highly portable image display and handling toolkit.

We describe a software system developed to handle images obtained from different sources, namely, computer-assisted tomography, positron emission tomography, single photon emission tomography and magnetic resonance imaging. In developing the system, it was necessary to address the following points. (1) The types of values that were encountered in both the header information and the pixel elements, namely, integers, floating point numbers, complex numbers and strings. (2) The use of domain-dependent sets of keys, that is, how to choose keys and how to stabilize the use of keys among the user population. This is, for example, how information such as the patient name, or the activity in becquerel is kept. It is necessary to keep both the key values and the units. (3) The development of a method for providing a database using flat files, i.e. linear text. (4) The maintenance of a history of values and operations. This is necessary in order to address the problem of determining from an image how that image was produced. The connection between an image and how it was derived is analogous to describing how a secondary standard is derived from a primary one.