Object graphics bug? [message #9421] |
Fri, 27 June 1997 00:00  |
Patrick Jones
Messages: 1 Registered: June 1997
|
Junior Member |
|
|
I am using IDL 5.0 on Win95.
I have been unable to get an image object to display in a window object.
Case 1: I have a 512x512 byte array called theImage, which holds image
data from a single-band file. The array displays properly using direct
graphics (tv, theImage). But when I try to display the image using
object graphics (following the example on p. 102 of the Objects manual),
my window remains completely black.
Case 2: Thinking that I have screwed up the object definitions, I follow
the 'rose.jpg' example on p. 102 to the letter. Still the image does
not display using object graphics (although tv, theImage[0,*,*]
correctly
displays the red 'band' of the image).
case 3: Thinking that the image object is at fault, I follow, to the
letter, the example "A Very Simple Plot", on p. 40 of the Objects
manual.
This also fails to display.
Is anyone else having this problem? I really don't think that I'm
making
any mistakes.
Example of problem code:
; myImage is a 512x512 byte array that displays correctly with tv
myWindow = obj_new('IDLgrWindow', dimensions=[512,512])
myView = obj_new('IDLgrView', view=[0,0,512,512])
myModel = obj_new('IDLgrModel')
myImage = obj_new('IDLgrImage', imageData)
myView->add, myModel
myModel->add, myImage
myWindow->draw, myView ; this fails; no image is displayed
tv, myImage ; this displays properly
Thanks in advance for help.
Pat Jones
--
Department of Anthropology
Tulane University
NO LA 70118
|
|
|
Re: Object Graphics [message #9616 is a reply to message #9421] |
Wed, 23 July 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Mirko Vukovic writes in response to a long-winded
response of mine:
> so, should we stay out of oo graphics for now? I'm enjoying oop but
> haven't ventured into oog yet mainly because of the file size.
No, I don't think we should stay out of object graphics. It is
like any new thing. There is a learning curve, both for the people
creating the software and the people using it. I think there is
no getting around the fact that object graphics files will be
larger than direct graphics files. But that has to be weighed
against new capability. And there is significant new capability,
especially with respect to any kind of 3D visualization.
What I would like to see RSI do is come up with graphics
windows that allow both object graphics and direct graphics
calls. Then instead of either/or you can have the best of
both worlds, when each is appropriate.
Cheers,
David
------------------------------------------------------------ -----
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
|
|
|
Re: Object Graphics [message #9623 is a reply to message #9421] |
Wed, 23 July 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Reinhold Kroll writes:
> Has anybody out there successfully used object graphics
> from IDL 5.0?
Yes, sort of. :-)
There are several examples of programs written using object
graphics on my web page. See for example XPLOT, which is
probably similar to the program you wrote.
> I put a very simple sine wave to the printer object and
> it creates me a 15 MB file, runs quarter of an hour or
> so. => completely useless.
You don't say what platform you are using, but I have
noticed similar things myself. The size of the output
file with XPLOT, for example, varies depending upon
what printer I have selected as my default printer. But
with my windows NT machine, the file varies from 1-1.5 Mbytes
in size. This is quite a bit larger than a regular PLOT command
in IDL, but is understandable given the nature of object
graphics and how they must be rendered. (For example, in
direct graphics only the two end points of a line are
required to render the line. In object graphics each pixel
will essentially be rendered individually, since each
has a 3D "space" associated with it.)
When I printed XPLOT on my Macintosh, however, the file was
over 21 MBytes in size (yes, 21, not 2.1!) and it never did
come out of my printer in the 3.5 hours I waited for it.
This was the first Mac beta release, and I am assured by the
folks at RSI that the latest Mac builds to not have this
problem.
I am also getting strange reports from people who have
downloaded some of my programs. Some people report ugly
colors (which I believe is a graphics driver problem of
some sort), and other people report that some of my
programs work and others either don't display properly
(the screen is blank), or they crash their machines. I
don't know what to make of any of this. The programs work
great on my machine.
I do know that there are quite a few bugs in the object
graphics part of IDL (to be expected, really, in such
a major new release) and I hear that an updated version
with my bug fixes will be available by the middle of
August.
Good luck,
David
------------------------------------------------------------ -
David Fanning, Ph.D.
Fanning Software Consulting
Customizable IDL Programming Courses
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
|
|
|
Re: Object Graphics [message #9625 is a reply to message #9421] |
Wed, 23 July 1997 00:00  |
Mirko Vukovic
Messages: 124 Registered: January 1996
|
Senior Member |
|
|
David Fanning wrote:
>
> Reinhold Kroll writes:
>
>> Has anybody out there successfully used object graphics
>> from IDL 5.0?
>
> Yes, sort of. :-)
>
> There are several examples of programs written using object
> graphics on my web page. See for example XPLOT, which is
> probably similar to the program you wrote.
>
>> I put a very simple sine wave to the printer object and
>> it creates me a 15 MB file, runs quarter of an hour or
>> so. => completely useless.
>
> You don't say what platform you are using, but I have
> noticed similar things myself. The size of the output
> file with XPLOT, for example, varies depending upon
> what printer I have selected as my default printer. But
> with my windows NT machine, the file varies from 1-1.5 Mbytes
> in size. This is quite a bit larger than a regular PLOT command
> in IDL, but is understandable given the nature of object
> graphics and how they must be rendered. (For example, in
> direct graphics only the two end points of a line are
> required to render the line. In object graphics each pixel
> will essentially be rendered individually, since each
> has a 3D "space" associated with it.)
>
> When I printed XPLOT on my Macintosh, however, the file was
> over 21 MBytes in size (yes, 21, not 2.1!) and it never did
> come out of my printer in the 3.5 hours I waited for it.
> This was the first Mac beta release, and I am assured by the
> folks at RSI that the latest Mac builds to not have this
> problem.
>
> I am also getting strange reports from people who have
> downloaded some of my programs. Some people report ugly
> colors (which I believe is a graphics driver problem of
> some sort), and other people report that some of my
> programs work and others either don't display properly
> (the screen is blank), or they crash their machines. I
> don't know what to make of any of this. The programs work
> great on my machine.
>
> I do know that there are quite a few bugs in the object
> graphics part of IDL (to be expected, really, in such
> a major new release) and I hear that an updated version
> with my bug fixes will be available by the middle of
> August.
>
> Good luck,
>
> David
>
> ------------------------------------------------------------ -
> David Fanning, Ph.D.
> Fanning Software Consulting
> Customizable IDL Programming Courses
> Phone: 970-221-0438 E-Mail: davidf@dfanning.com
> Coyote's Guide to IDL Programming: http://www.dfanning.com
> IDL 5 Reports: http://www.dfanning.com/documents/anomaly5.html
so, should we stay out of oo graphics for now? I'm enjoying oop but
haven't ventured into oog yet mainly because of the file size.
--
Mirko Vukovic, Ph.D 3075 Hansen Way M/S K-109
Novellus Systems Palo Alto, CA, 94304
415/424-4969 mirko.vukovic@varian.grc.com
|
|
|