IDL 8.0: How to update IMAGE data? [message #71912] |
Fri, 30 July 2010 01:06  |
David Grier
Messages: 35 Registered: July 2010
|
Member |
|
|
Dear Folks,
I'd like to update the data in an IDL 8.0 IMAGE graphic.
What's the "right" way to do this?
I've been doing things like
a = dist(256)
b = -a
im = image(a)
im = image(b,/OVERPLOT)
which works, but just feels wrong to me.
I was expecting to be able to do things like
im = image(a)
im.DATA = b
and have the image update properly. But apparently
I'm missing something, and this doesn't work.
Any thoughts?
TTFN,
David
|
|
|
Re: IDL 8.0: How to update IMAGE data? [message #71987 is a reply to message #71912] |
Fri, 30 July 2010 10:36  |
Michael Galloy
Messages: 1114 Registered: April 2006
|
Senior Member |
|
|
On 7/30/10 9:35 am, David Grier wrote:
> On 7/30/10 11:03 AM, Paulo Penteado wrote:
>> On Jul 30, 5:06 am, David Grier<david.gr...@nyu.edu> wrote:
>>> Dear Folks,
>>>
>>> I'd like to update the data in an IDL 8.0 IMAGE graphic.
>>> What's the "right" way to do this?
>>>
>>> I've been doing things like
>>>
>>> a = dist(256)
>>> b = -a
>>> im = image(a)
>>> im = image(b,/OVERPLOT)
>>>
>>> which works, but just feels wrong to me.
>>>
>>> I was expecting to be able to do things like
>>>
>>> im = image(a)
>>> im.DATA = b
>>>
>>> and have the image update properly. But apparently
>>> I'm missing something, and this doesn't work.
>>>
>>> Any thoughts?
>>>
>>> TTFN,
>>>
>>> David
>>
>> im.putdata,b
>
> Wow. Thanks. That was simple. Is the PUTDATA method documented?
> It doesn't show up in idlhelp's search, and is not discussed in
> the documentation for IMAGE.
>
> This makes me wonder what else I'm missing.
Yes, it appears a lot of useful stuff is not in there. One trick to get
information on properties (not helpful here, though since putData is a
method): you can PRINT a graphics object and it will show its properties.
Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
|
|
|
Re: IDL 8.0: How to update IMAGE data? [message #71999 is a reply to message #71912] |
Fri, 30 July 2010 08:35  |
David Grier
Messages: 35 Registered: July 2010
|
Member |
|
|
On 7/30/10 11:03 AM, Paulo Penteado wrote:
> On Jul 30, 5:06 am, David Grier<david.gr...@nyu.edu> wrote:
>> Dear Folks,
>>
>> I'd like to update the data in an IDL 8.0 IMAGE graphic.
>> What's the "right" way to do this?
>>
>> I've been doing things like
>>
>> a = dist(256)
>> b = -a
>> im = image(a)
>> im = image(b,/OVERPLOT)
>>
>> which works, but just feels wrong to me.
>>
>> I was expecting to be able to do things like
>>
>> im = image(a)
>> im.DATA = b
>>
>> and have the image update properly. But apparently
>> I'm missing something, and this doesn't work.
>>
>> Any thoughts?
>>
>> TTFN,
>>
>> David
>
> im.putdata,b
Wow. Thanks. That was simple. Is the PUTDATA method documented?
It doesn't show up in idlhelp's search, and is not discussed in
the documentation for IMAGE.
This makes me wonder what else I'm missing.
Many thanks,
David
|
|
|
Re: IDL 8.0: How to update IMAGE data? [message #72004 is a reply to message #71912] |
Fri, 30 July 2010 08:03  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Jul 30, 5:06 am, David Grier <david.gr...@nyu.edu> wrote:
> Dear Folks,
>
> I'd like to update the data in an IDL 8.0 IMAGE graphic.
> What's the "right" way to do this?
>
> I've been doing things like
>
> a = dist(256)
> b = -a
> im = image(a)
> im = image(b,/OVERPLOT)
>
> which works, but just feels wrong to me.
>
> I was expecting to be able to do things like
>
> im = image(a)
> im.DATA = b
>
> and have the image update properly. But apparently
> I'm missing something, and this doesn't work.
>
> Any thoughts?
>
> TTFN,
>
> David
im.putdata,b
|
|
|