comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Image scale as 0 - 4096 instead of 0 - 255
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Image scale as 0 - 4096 instead of 0 - 255 [message #29943 is a reply to message #29908] Tue, 26 March 2002 16:45 Go to previous messageGo to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"Akhila" <idlfreak@yahoo.com> wrote in message
news:b1ad7b05.0203261438.19606cd0@posting.google.com...
> I can display two images in two different windows in direct graphics
> like this:
>
> ...
>

> I want to display the two images this way in two windows but in
> object graphics. I tried to do the following in object graphics, but
> didn't help.
>
> oImage = Obj_New('IDLgrImage', image, ORDER = 2)
> oWindow = Obj_New('IDLgrWindow')
> oView = Obj_New('IDLgrView', VIEWPLANE_RECT = [0,0,512,512], COLOR =
> [0,0,0], PROJECTION = 2)
> oModel = Obj_New('IDLgrModel')
> oModel -> Add, oImage
> oView -> Add, oModel
> oWindow -> Draw, oView
>
> and again for image1.
>
> ...

Hmmm. I think it's a redrawing problem. If I run your code on my
system (IDL 5.5, Windows 2000, hardware renderer) I get two object
graphics windows, one on top of the other. The image is visible in the
second window (ie. the one initially visible), but when I expose the
first window it's black. Then when I expose the first window it's
black also. And they both stay black thereafter, because the
IDLgrWindow objects don't retain their contents and they're not being
redrawn on exposure.

A simple fix is to set the RETAIN property of the IDLgrWindows to
something other than 0. (Possible values are 1 & 2. On Windows they
give identical results. On Unix it depends on X backing store and
other complicated stuff--try them both.)

The basic problem is that Object Graphics provides quite a nice
toolkit for scientific visualisation, but it's all very
low-level. Plain IDLgrWindow objects are not really very useful. You
need an object-graphics window embedded in a widget application with
event-handling code to take care of redrawing. You could display each
of your IDLgrImage objects with XOBJVIEW. Or you roam through David
Fanning's WWW site looking for something suitable. My IDL libray has a
general-purpose OG window object (MGH_Window) that could be just what
you need. It's at

http://katipo.niwa.cri.nz/~hadfield/gust/software/idl/

As I've explained recently on this group, my library is not as
user-friendly as some others. But you're welcome to try it out and I'd
love to hear how you get on.

--
Mark Hadfield
m.hadfield@niwa.co.nz Ka puwaha et tai nei
http://katipo.niwa.co.nz/~hadfield Hoea tatou
National Institute for Water and Atmospheric Research (NIWA)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: command line edit problem
Next Topic: Re: updating a different widget from the event handler

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 17:38:45 PDT 2025

Total time taken to generate the page: 1.20385 seconds