Re: XForms: SELL ME A CLUE: 16-bit GreyScale into PseudoColor 8-bit

Steve Lamont (spl@szechuan.ucsd.edu)
Thu, 5 Jun 97 15:09:33 PDT

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> I need some simple code that will take an Intel Raw 16-bit
> (unsigned short int) and return an 8-bit GreyScale value that will
> go nicely into the MAIN FORM window with "xcamera -visual PseudoColor"
> being the default display mode.
>
> Has anyone done this?

I do something similar in serveral image processing programs.

I create a GL Canvas and use OpenGL or MesaGL (the freely available X
based OpenGL clone) to just do a glDrawPixels() into the canvas.
Works neat and fast.

You can get Mesa at

ftp://iris.ssec.wisc.edu/pub/Mesa

The latest official version at this writing is 2.2. A Beta version of
it is available in

ftp://iris.ssec.wisc.edu/tmp/Mesa-2.3beta2.tar.gz

It works really well.

The glDrawPixels() function accepts all sorts of different data types,
including unsigned short. You can do zooms and, with some work, pans
of pixel data quite easily.

spl
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/