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

Home » Public Forums » archive » Object graphics questions and comment
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Object graphics questions and comment [message #9709] Fri, 08 August 1997 00:00 Go to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
Hello,

I'm in the process of writing a viewer for atmospheric absorption
spectra - the data files of which often contain 1000's of spectra. I
decided to use IDL object graphics for a number of reasons:

- makes it easy to do zoom boxes
- makes it easy to do overplotting on resizeable window (sort of like
David Fannings XWINDOW but without the need for a wrapper)
- makes it easy to add annotation
- in the words of Mr. Fanning, makes me look like an "up-to-date and
with-it IDL programmer".

Anyway, I create a zoom box on a left button down event, add it to my
plot_model and draw the resulting view (info_ptr is a pointer to the
info structure ala D.F. and is stored in the user value of the top level
base) :

(*info_ptr).zbox = obj_new( 'IDLgrPolygon',
$
(*info_ptr).zbox_norm_xcoords, $
(*info_ptr).zbox_norm_ycoords, $
color = [ 0, 255, 0 ], style = 1 )
(*info_ptr).plot_model -> add, (*info_ptr).zbox
(*info_ptr).window -> draw, (*info_ptr).view

For motion events I do the following after updating the dynamic corner
of the zoombox:

old_zbox = (*info_ptr).zbox
(*info_ptr).plot_model -> remove, (*info_ptr).zbox
obj_destroy, old_zbox

(*info_ptr).zbox = obj_new( 'IDLgrPolygon', $
(*info_ptr).zbox_norm_xcoords, $
(*info_ptr).zbox_norm_ycoords, $
color = [ 0, 255, 0 ], style = 1 )
(*info_ptr).plot_model -> add, (*info_ptr).zbox
(*info_ptr).window -> draw, (*info_ptr).view

Now all this works great. I get a lovely zoom box except IT IS SOOOOO
SLOW? I test my code on a 1000 element data set and the zoom box can't
keep up with the mouse motion events. Increase the number of points and
it's unusable.

MY QUESTIONS: Is the snail pace response implicit of IDLs of object
graphics (another e.g. IDLs Insight. Good lord) or is there another way
to do this without having to do a
(*info_ptr).window -> draw, (*info_ptr).view
every time? In Direct Graphics you simply erase ONLY the box and then
redraw ONLY the new box, you don't redraw the entire view. Can this be
done using Object Graphics? The documentation is obtuse and unhelpful.

MY COMMENT: IMO, IDLs Object Graphics is necessary for easier
programming of user friendly data visualisation tools. However, the
speed of Object Graphics verges on being laughable (my perhaps poorly
programmed example above notwithstanding). It is a step backwards and
does not encourage the average IDL programmer (me) to utilise this
powerful tool. My (hopeful) assumption is that future incremental
releases of IDLv5 will contain Object Graphics that produce graphics as
fast or faster than Direct Graphics.

Phew!

I'm curious - who out there are actually using IDLs Object Graphics
capability?

regards,

Paul van Delst
Space Science and Engineering Center
University of Wisconsin-Madison
(608) 265-5357
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Object graphics questions
Next Topic: Re: Editting IDL files under MacOS X

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

Current Time: Fri Oct 10 03:17:12 PDT 2025

Total time taken to generate the page: 0.31915 seconds