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

Home » Public Forums » archive » Re: Object Graphics: Black Box
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: Object Graphics: Black Box [message #26468 is a reply to message #26467] Thu, 23 August 2001 12:09 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Adam Rankin (arankin@irus.rri.on.ca) writes:
>
> A fun one to throw at you...
> I load a widget_draw and give it the GRAPHICS_LEVEL=2 keyword...
> I make an IDLgrImage,IDLgrModel,IDLgrView and a IDLgrScene
> and add them appropriately using data retrieved by READ_DICOM
> (I tested the data with TVSCL and it works)
> but when I load it into this draw widget all that appears is a black box!
>
> Any suggestions?

Uh, you are looking at the first pixel in the image. :-)

But don't worry, this is almost inevitably
what new object graphics users look at
when they first start. (If they can see
*anything* in their window.)

You have to make the arbitrary coordinatee system
of the viewplane rectangle match the coordinate
system of the image. In your case, I would probably
try setting the viewplane rectangle like this:

oImageView = obj_new('IDLgrView', $
VIEWPLANE_RECT=[0,0,128,128])

Assuming the image is 128 by 128, that will fill
the image up in the window. (Which may or may not
be what you want.) But at least you will see
*something*, which is always half the battle with
object graphics. :-)

If you want another example, see my XImage program
here:

http://www.dfanning.com/programs/ximage.pro

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: "private" and "public" attributes in IDL.
Next Topic: file directory

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

Current Time: Sun Oct 12 04:29:26 PDT 2025

Total time taken to generate the page: 0.79720 seconds