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

Home » Public Forums » archive » Re: how to save image in full size
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: how to save image in full size [message #48993] Sun, 11 June 2006 09:32 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> The coordinate system for a typical image is easy to set up,
> given a POSITION in the window, and XRANGE and YRANGE
> values that describe the extent of the coordinate system
> in X and Y. Here is the DRAW method of my coordinate object.

I probably should mention that the coordinate object
is "drawn" prior to any graphics (including the image)
being drawn into the window. This is so the data coordinate
system can be established. Once it is established, I can
convert from DEVICE or NORMAL coordinates to DATA coordinates
with the usual COORD_CONVERT. For example, if an overlay
position is chosen interactively in DEVICE coordinates
with the mouse, I can immediately convert it to DATA
coordinates when I save the overlay position in my program.

All output, then is done in DATA coordinates, which acts to
position overlays appropriately when displaying into a
window of any size. All that has to happen is that the
coordinate system is "drawn" prior to display.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: how to save image in full size [message #48994 is a reply to message #48993] Sun, 11 June 2006 08:21 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
heqjxiaoyao@163.com writes:

> How can i save my picture in full data size in IDL.
> The size of data is 2400*1800, but it is slowly to show full size in
> draw window,
> so i set the draw window's size is 800*600 and use the keyword:
> app_scroll,
> now the image shown in window is part of the full image , and i draw
> grid and vector overlap
> the image.
> But now i want to save the full size of image,How can i do this?

The way I typically handle this situation is to create
a coordinate system for the image. (The image coordinate
system is part of what an image "object" is in my code.)
The image overlays, then, are placed on the image in the
image coordinate system. This way, the image and its
associated overlays are resolution independent and can
be displayed in a window of *any* size, including the
"window" of a PostScript file.

The coordinate system for a typical image is easy to set up,
given a POSITION in the window, and XRANGE and YRANGE
values that describe the extent of the coordinate system
in X and Y. Here is the DRAW method of my coordinate object.

; ************************************************************ *********
PRO CatCoord::Draw, Extra=extrakeywords

@cat_pro_error_handler

; Set up the data coordinate space by setting scaling and window
; system variables.

; Calculate scaling factors.
self._xs = Normalize(self._xrange, Position=[self._position[0],
self._position[2]])
self._ys = Normalize(self._yrange, Position=[self._position[1], $
self._position[3]])

; Load system variables.
!X.S = self._xs
!Y.S = self._ys
!X.Window = [self._position[0], self._position[2]]
!Y.Window = [self._position[1], self._position[3]]

; Done.
self -> Report, /Completed

END
; ************************************************************ *********


Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Re: how to save image in full size [message #49091 is a reply to message #48993] Sun, 11 June 2006 17:54 Go to previous message
heqjxiaoyao is currently offline  heqjxiaoyao
Messages: 4
Registered: June 2006
Junior Member
thanks for your help!
i'll try to do it
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to save image in full size
Next Topic: Using GDL: error message

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

Current Time: Wed Oct 08 20:02:50 PDT 2025

Total time taken to generate the page: 0.04165 seconds