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

Home » Public Forums » archive » Re: interact with iimage from the command line?
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: interact with iimage from the command line? [message #60458 is a reply to message #60457] Wed, 21 May 2008 08:55 Go to previous messageGo to previous message
Keflavich is currently offline  Keflavich
Messages: 19
Registered: May 2008
Junior Member
On May 21, 6:22 am, David Fanning <n...@dfanning.com> wrote:
> Keflavichwrites:
>> tvimage? Is that equivalent to tv, tvscl?
>
> TVIMAGE is equivalent to TV in the way a Porche
> is equivalent to a Buick. :-)

Alright, I'll have to explore that.

>> Anyway, what I really want to do is display fully sampled data with an
>> aspect ratio that allows it all to be viewed at once, but also display
>> it in an interactive window so that a user can zoom in on parts of the
>> data and possibly even change the transfer function interactively. I
>> think the 'tv' is wrong for this sort of task - am I mistaken?
>
> Yes, you are mistaken. TV allows you to display images. Period.
> All the other stuff you are interested in has to do with how the
> user interacts with data. That, generally speaking, involves
> widget programming. Since you are just starting in IDL, let
> me give you some advice. You could learn widget programming
> fifty times over before you make any progress on programming
> an iTool.

You're right that I don't want to program any widgets. I was hoping a
widget existed that already did what I wanted - it looks like iimage
nearly does that. If, for example, I use iimage,congrid(data,
400,400), it gives me pretty much what I want: a data display that can
be interacted with. However, congrid (or indexing) changes the actual
state of the data, which is not ideal.

>> atv
>> comes somewhat close, but I don't think it can display weird aspect
>> ratios either.
>
> Aspect ratios are determined simply by how you resize the image.
> In the simplest case, just make an IDL graphics window in the
> aspect ratio you want, and use TVIMAGE to display the data.
> There you go, done.
>
> Have a look at a program like ZIMAGE or XSTRETCH. (You can
> find them both on my web page.) These do the kinds of things
> you are looking for, if not exactly the way you want to do
> them. I guarantee you, they will be a LOT easier to understand
> than any iTool you pick up.

Those are both neat codes, and I think I will be able to use them for
this task. There isn't a single display code that does both, though,
is there?

>> Honestly, though, I haven't figured out a good way to display even
>> downsampled data on the tv. I'm fairly inexperienced with IDL, but I
>> have a lot of experience with other data languages. Is there any way
>> to take, e.g., every 10th element along a given axis?
>
> This, my friend, is what IDL lives to do!
>
> IDL> s = Size(image, /Dimensions) & Print, s
> 100 10000
> IDL> each10 = Indgen(1000) * 10
> IDL> resampledImage = image[*,each10]
>
> But, this is *much* more easily accomplished by simply resizing
> your array:
>
> IDL> resampledImage = Rebin(image, 100, 1000)
>
> Or, if you want it some "weird" size:
>
> IDL> weirdImage = Congrid(image, 500, 700)
>
> Any of those images can be displayed with a TV command. :-)

Ah... ok. I had tried 'rebin' but didn't have an integer factor size
in my 2nd dimension. The [*,each10] trick I think I should have
known, but have never used. Thanks.

Adam
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: matrix division
Next Topic: Reading Others Code

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

Current Time: Fri Oct 10 01:05:47 PDT 2025

Total time taken to generate the page: 0.88182 seconds