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

Home » Public Forums » archive » problem with corrupted pix-maps
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
problem with corrupted pix-maps [message #12160] Tue, 30 June 1998 00:00
mirko_vukovic is currently offline  mirko_vukovic
Messages: 50
Registered: January 1998
Member
hello,

following instructions of some of our more esteemed colleagues on this group,
I created copies of two windows in memory.

The purpose was to animate a marker. This is a gui application in which
with a cursor on one plot, the code finds the closest point on the curve,
puts a marker there, *and* a marker on the corresponding point on the curve
on the other plot.

I use the memory resident copies to restore the plots prior to re-plotting
the markers when the cursor moves.

It almost works in practice, except that on one of the plots, if I put the
marker close to the left axis, it seems to *corrupt* (ie, make its way into)
the memory resident copy of the plot.

Now, in such situations,the first thought that comes to mind is a bug in IDL.
The second (and usually more correct thought) is that I overlooked something.
But it must be something truly peculiar, as the plot gets corrupted only
when the cursor and marker move into that particular region of the plot
(say leftmost 20% of the plot region).

Any thoughts outthere on what I may be missing? I contacted RSI, and
other than suggesting that I send them the code, they could not offer any
advice.

mirko



-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
Re: problem with corrupted pix-maps [message #12162 is a reply to message #12160] Mon, 29 June 1998 00:00 Go to previous message
Phillip & Suzanne is currently offline  Phillip & Suzanne
Messages: 31
Registered: June 1998
Member
David Fanning wrote:
> Mirko Vukovic (mirko_vukovic@notes.mrc.sony.com) offers us
> a programming puzzle when he writes:
>> following instructions of some of our more esteemed colleagues on this group,
>> I created copies of two windows in memory.

[ snipped description of things going awry ]

>> Now, in such situations,the first thought that comes to mind is a bug in IDL.
>> The second (and usually more correct thought) is that I overlooked something.
> A simple switch of an x coordinate in place of a y coordinate
> has been known to produce effects such as this. Does the problem go
> away if your window is square?

I have also had problems using pixmap windows. In my case, the problem
occurred when I was using IDL 4.0 on a Macintosh. I had a pixmap window that
was supposed to hold frames from a movie. I decided to create a single, very
large pixmap window, and handle creating offsets myself to extract just the
portion for the current frame. I thought this would work well, and it did on
both my Windows NT workstation and the UNIX workstation I use. When I tried
to test it on the Mac, things got quite weird. When I decided to use a
separate pixmap window for each frame, and copied the entire window each time,
the problem went away.

IDL 5.0 fixed the problem I was seeing, so I don't know what was going on.
However, the hypothesis that your problem *MIGHT* be a bug in IDL is truly feasible.

Phillip David

IDL Tool Developer
XonTech, Inc.
Re: problem with corrupted pix-maps [message #12165 is a reply to message #12160] Mon, 29 June 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Mirko Vukovic (mirko_vukovic@notes.mrc.sony.com) offers us
a programming puzzle when he writes:

> following instructions of some of our more esteemed colleagues on this group,
> I created copies of two windows in memory.
>
> The purpose was to animate a marker. This is a gui application in which
> with a cursor on one plot, the code finds the closest point on the curve,
> puts a marker there, *and* a marker on the corresponding point on the curve
> on the other plot.
>
> I use the memory resident copies to restore the plots prior to re-plotting
> the markers when the cursor moves.
>
> It almost works in practice, except that on one of the plots, if I put the
> marker close to the left axis, it seems to *corrupt* (ie, make its way into)
> the memory resident copy of the plot.
>
> Now, in such situations,the first thought that comes to mind is a bug in IDL.
> The second (and usually more correct thought) is that I overlooked something.

Uh, I vote for the more correct thought. :-)

> But it must be something truly peculiar, as the plot gets corrupted only
> when the cursor and marker move into that particular region of the plot
> (say leftmost 20% of the plot region).

Humm. Every good mystery has a seminal clue. I think this is it.
In my experience things creeping into a particular region of the
plot means that something has gone wrong with the Device, Copy
coordinates. My guess is that you are not copying the entire window,
but only a portion of it with Device, Copy. With two pixmaps you
are probably doing a lot of switching back and forth. I would make
sure you are copying the region of the window you *think* you are
copying. A simple switch of an x coordinate in place of a y coordinate
has been known to produce effects such as this. Does the problem go
away if your window is square?

> Any thoughts out there on what I may be missing? I contacted RSI, and
> other than suggesting that I send them the code, they could not offer any
> advice.

Don't you wish technical support people had more imagination? How
dreary. I would have made up something wild and extravagant. :-)

Cheers,

David

---
David Fanning, Ph.D.
Fanning Software Consulting
E-Mail: davidf@dfanning.com
Phone: 970-221-0438
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Polynomial warping of satellite images
Next Topic: Re: Setting tick mark spacing

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

Current Time: Sat Oct 11 08:42:43 PDT 2025

Total time taken to generate the page: 0.23974 seconds