University Crest

[wlug] X window programming

 
wlug archive index About the wlug list Mailing lists home
To The University of Waikato HomepageWaikato Home > Waikato Mailing Lists > wlug Info > wlug archives
Michael Cree cree@p...
Tue Aug 13 13:51:28 NZST 2002


Craig Box writes:

 > Surely there is a library that does what you're asking?  (As far as I can
 > tell from your message, it is just an image viewer).

No, it's not _just_ an image viewer!  It is a C link library that provides
an easy interface for the display of scientific images.  By scientific, I
mean that images need not be unsigned byte (256 greyscale) or RGB (24bit
truecolour) but may be signed integers (16bit or 32bit) or even
floating-point (IEEE single or double precision).  Potentially
complex-fields could be displayed too (but that is not currently in my list
of desired attributes).

The C library provides a function to initialise the display and another
function to display an image. On calling the initialising function it
performs a fork with one process returning to the calling program so that it
can continue executing, and the other process maintaining the image display
so that it can remain intact with cover/expose and other events.

It also provides a very basic interface to return key presses and mouse
moves to the calling program.  That's where the CPU waiting happens.  Churns
up CPU time on a multiuser machine.  Not very polite!

 > If you give a bit more background on the application you need performed at
 > the end, someone might be able to suggest something that will do what you
 > want, short of porting the library you have. 

I would prefer to use the library I already have - I have a reasonably
substantial image processing library that depends on its function interface
(but the display library is unuseable on the Compaq ALphas and now on Linux
since we always use 24bit truecolour display now).  Admittedly, the
interface to the image display library is partially abstracted and
completely in one module, so an interface to another library could be done -
but personally I would like to avoid that.

 > For example, the ImageMagick
 > library  (http://www.imagemagick.org/) does a lot of image processing and
 > display functions, and there could well be a viewer based on this that does
 > at least some of what you want.

ImageMagick comes with the display, convert, identify and other programs.
It does not support image types suitable for scientific image display.  I
have just read the man pages and they make no mention of supported image
data types.  I also attempted to display a TIFF image, that has an IEEE
double precision floating point datatype (and the SAMPLEFORMAT tag
appropriately set), with ImageMagick's display command and it failed.  I do
not know of an image viewer - other than the one I wrote using the image
display library which I would like developed further - that works on such
images.

Michael.

 ----------------------------------------------------------------------
 Dr Michael Cree                Email:     cree@p...
 Lecturer
 Dept. Physics and Elec. Eng.
 University of Waikato
 Private Bag 3105               Fax:       +64-7-8384835
 Hamilton                       Telephone: +64-7-8384301
 New Zealand


More information about the wlug mailing list
NOTICE: This is an archive of a public mailing list. The University of Waikato is not responsible for its contents.

The University of Waikato - Te Whare Wananga o Waikato