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

Home » Public Forums » archive » Re: Full Image Display
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
Re: Full Image Display [message #37798] Mon, 26 January 2004 06:36
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Fotis Mavromatakis writes:

> Would FSC_Window output the whole image and not just
> what is contained in the 400x200 window ?
> Does this mean that if a window is resizable, it is possible
> to grab the whole image ?

Typically in IDL one answers questions like this with 10 seconds
of experimentation, but, yes that's what it does. Although
"grab" is an odd word to use. I would have used "display".

> I am interested in saving the full size of an image (e.g. 2000x1500)
> BUT WITH annotations (contours, scale bar, etc.) ?
> What I have done so far is the following : I can save the whole
> image but without annotations. I can save annotations but only
> that part of the image which is seen in the display window.
> Can you achieve both tasks simultaneously ?

Assuming you have an IDL procedure that can draw something
in a graphics window of any size (in general this means
annotations are positioned with data or normalized coordinates
and not device coordinates, like you would do if you wanted your
program to display in a PostScript window), then, yes, FSC_Window can
display it in a resizeable graphics window. The only limitation
FSC_Window makes is that your display procedure have no more than three
positional parameters. You can have an unlimited number of keyword
parameters.

There is a program called HISTOIMAGE that comes with my book,
for example, that draws an image, a histogram plot of the image,
and a colorbar in the same window. This is put into a resizeable
graphics window like this:

IDL> FSC_Window, 'histoimage', image


> And a question about color_define.
> In your web page the colours are nicely split in 16 intervals.
> I had also set 16 intervals but in my case some mixing of the
> colours is seen. Is there some keyword to set which I may not
> be using ?

I don't know. You will have to give me more details about
what you are doing. Are you asking whether I fudge pictures?
No, never. It plays havoc with your credibility. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
Re: Full Image Display [message #37799 is a reply to message #37798] Mon, 26 January 2004 00:04 Go to previous message
Fotis is currently offline  Fotis
Messages: 2
Registered: December 2003
Junior Member
David Fanning wrote:
>
> Well, you could do a couple of things. You could make
> the window some other size:
>
> Window, XSize=400, YSize=200
> TVImage, image
>
> Or, you could put it in a resizeable graphics window:
>
> FSC_Window, 'TVImage', image
>
> You will need the FSC_Window program:
>
> http://www.dfanning.com/programs/fsc_window.zip
>
> You would be able to save your image in various
> formats and print it if you use this program.
>
> Cheers,
>
> David
Would FSC_Window output the whole image and not just
what is contained in the 400x200 window ?
Does this mean that if a window is resizable, it is possible
to grab the whole image ?
I am interested in saving the full size of an image (e.g. 2000x1500)
BUT WITH annotations (contours, scale bar, etc.) ?
What I have done so far is the following : I can save the whole
image but without annotations. I can save annotations but only
that part of the image which is seen in the display window.
Can you achieve both tasks simultaneously ?

And a question about color_define.
In your web page the colours are nicely split in 16 intervals.
I had also set 16 intervals but in my case some mixing of the
colours is seen. Is there some keyword to set which I may not
be using ?
Cheers,
Fotis

--
Dr. Fotis Mavromatakis
University of Crete, Skinakas Observatory
Tel.: +30-2810-394251 | Fax : +30-2810-394201
http://www.physics.uoc.gr/~fotis | mailto:fotis@physics.uoc.gr
Re: Full Image Display [message #37801 is a reply to message #37799] Sat, 24 January 2004 13:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gaurav writes:

> Thanks for the help....first i tried the method suggested by Mr. Ben
> Tupper....but it dint work out (i tried it with dim(1) & dim (2) also
> ) ....it was just displaying a blank window.
>
> Then i tried to work with TVIMAGE.pro & it is working fine. Yet
> there is this problem of the window size...whatever be the true size
> of the image, it is always displayed in a 512 x 512 window

Well, you could do a couple of things. You could make
the window some other size:

Window, XSize=400, YSize=200
TVImage, image

Or, you could put it in a resizeable graphics window:

FSC_Window, 'TVImage', image

You will need the FSC_Window program:

http://www.dfanning.com/programs/fsc_window.zip

You would be able to save your image in various
formats and print it if you use this program.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
Re: Full Image Display [message #37802 is a reply to message #37801] Sat, 24 January 2004 10:15 Go to previous message
gauravjn123 is currently offline  gauravjn123
Messages: 7
Registered: July 2003
Junior Member
Thanks for the help....first i tried the method suggested by Mr. Ben
Tupper....but it dint work out (i tried it with dim(1) & dim (2) also
) ....it was just displaying a blank window.

Then i tried to work with TVIMAGE.pro & it is working fine. Yet
there is this problem of the window size...whatever be the true size
of the image, it is always displayed in a 512 x 512 window

Cheers
Gaurav

Ben Tupper <btupper@bigelow.org> wrote in message news:<bus02h$km9tr$1@ID-189398.news.uni-berlin.de>...
> Gaurav wrote:
>> Hello everybudy!
>> Could anyone please tell me...how do we display a image in IDL?
>> Right now i am using the 'TV' function but it is not displaying the
>> full image. It is actually displaying only a 512*512 portion of the
>> image (irrespective of the actual size of the image provided it is
>> more than 512*512). Can anyone tell me why does it happen so & also
>> suggest a better alternative for the 'TV' function.
>>
>
> Hello,
>
> The TV command is drawing the entire image, but I expect you window size
> is not matched to the image size. Any portion of you image that isn't
> displayed is drawn 'off-canvas' so to speak. Try the following...
>
> dim = SIZE(image, /DIM)
> Window, /FREE, xsize = dim[0], ysize = dim[1]
> TV, image
>
> If you have a very large image, you should consider spending time at
> www.gumley.com and www.dfanning.com where you can find more robust image
> display software for IDL. Come to think of it, you should spend some
> time at those sites just for general IDL know-how.
>
> Cheers,
> Ben
Re: Full Image Display [message #37810 is a reply to message #37802] Fri, 23 January 2004 12:26 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
Gaurav wrote:
> Hello everybudy!
> Could anyone please tell me...how do we display a image in IDL?
> Right now i am using the 'TV' function but it is not displaying the
> full image. It is actually displaying only a 512*512 portion of the
> image (irrespective of the actual size of the image provided it is
> more than 512*512). Can anyone tell me why does it happen so & also
> suggest a better alternative for the 'TV' function.
>

Hello,

The TV command is drawing the entire image, but I expect you window size
is not matched to the image size. Any portion of you image that isn't
displayed is drawn 'off-canvas' so to speak. Try the following...

dim = SIZE(image, /DIM)
Window, /FREE, xsize = dim[0], ysize = dim[1]
TV, image

If you have a very large image, you should consider spending time at
www.gumley.com and www.dfanning.com where you can find more robust image
display software for IDL. Come to think of it, you should spend some
time at those sites just for general IDL know-how.

Cheers,
Ben
Re: Full Image Display [message #37811 is a reply to message #37810] Fri, 23 January 2004 12:24 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Gaurav writes:

> Could anyone please tell me...how do we display a image in IDL?
> Right now i am using the 'TV' function but it is not displaying the
> full image. It is actually displaying only a 512*512 portion of the
> image (irrespective of the actual size of the image provided it is
> more than 512*512). Can anyone tell me why does it happen so & also
> suggest a better alternative for the 'TV' function.

I'm guessing your window is only 512 by 512 (or something
like it). If you want something smarter than TV there are
several alternatives, TVImage, IMDISP, PLOTIMAGE, etc. Here
is one:

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

These will take into consideration the size of the window
when displaying the data and make the image smaller if
need be.

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Extracting ROI without IDL objects is it possible
Next Topic: Virtual Machine in Windows

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

Current Time: Wed Oct 08 16:00:24 PDT 2025

Total time taken to generate the page: 0.00698 seconds