Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
I'm writing a program where I simultaneously display multiple images of the same object in separate windows. The images are from different imaging modalities, and they are properly aligned with each other. My problem is this; when the cursor is in one of windows, I'd like to display the cursor symbol (+) at the same position in all the windows, and I'd like the multiple cursor symbols to move smoothly together when I move the mouse. Has anybody done this, or have any suggestions? Alan
In article <33F9ADDA.52BFA1D7@commander.eushc.org>, John Votaw <votaw@commander.eushc.org> wrote: > I am displaying two images of the same object (PET and MRI) side-by-side > and would like to be able to point out corresponding pixels. The images > are the same size and alignment. Currently, I put each image in its own > draw widget and use the arrow cursor. Once the user moves into one of > the images, I would like to have a duplicate cursor appear at the same > relative position in the other image. Does anyone know how to do this > for a real-time application? > > I can only use 8-bit color and am using IDL 4.0 on a Sun SPARCstation > 10. I'm assuming you have the images being displayed on bitmaps and copied to the draw widgets from their respective bitmaps (if not, I'd recommend it). Set /Motion_Events for Widget_Draw on both displays. When events are generated in the display window you'll know the location of the cursor. Using the Device, Copy=[Xs, Ys, Nx, Ny, Xd, Yd, W] command, you can pick up a chunk of the image from the bitmap, superimpose a cross-hair on it and draw the modified chunk on the draw widget. You'll have to keep track of the previous location of the cursor so you can remove the crosshair from it as you move along the image. That's an idea, anyway. Send private email if you'd like more details. -- Mike Schienle Interactive Visuals mgs@sd.cybernex.net http://ww2.sd.cybernex.net/~mgs/