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

Home » Public Forums » archive » Re: clipping images with TV?
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: clipping images with TV? [message #34328] Thu, 06 March 2003 07:55 Go to next message
egraves is currently offline  egraves
Messages: 9
Registered: January 2000
Junior Member
> Are aou speaking from something like
>
> ;+
> ; NAME:
> ; reduce_image_size
> ;
> ; PURPOSE:
> ; This function returns the mask to reduce the white space around a given
> image

Maybe I should have better elucidated what I want to do. I'm displaying
an image with overlaid annotation and ROIs. When I display this to a draw
widget, obviously anything that lays outside the window is not drawn. I
want this to extend to when I display on a postscript page, so that parts
of the image/ROI/annotation that lay outside a given area are not drawn.
For PLOTS and XYOUTS, you can specify a clipping window using the CLIP
keyword, so that graphics outside this window are not drawn. I was
wondering if there was a simple way to do this for images as well, because
(at least in IDL 5.4) the CLIP keyword does not apply to the TV procedure.






Ted Graves
graves@helix.mgh.harvard.edu
Re: clipping images with TV? [message #34332 is a reply to message #34328] Wed, 05 March 2003 12:26 Go to previous messageGo to next message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Ted Graves wrote:

> Hi all,
>
> I was curious if there was a simple way to clip displayed images with TV,
> like the way you can specify a clipping window for the PLOTS and XYOUTS
> procedures. I suppose I could manually clip the image before displaying
> it, but I thought I'd check with the gurus first in case they have a
> simpler solution.
>
>
>
>
> Ted Graves
> graves@helix.mgh.harvard.edu

Are aou speaking from something like

;+
; NAME:
; reduce_image_size
;
; PURPOSE:
; This function returns the mask to reduce the white space around a given
image
;
; CATEGORY:
; PROG_TOOLS/WIDGETS
;
; CALLING SEQUENCE:
; result=reduce_image_size(image,[border=border])

http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_source/idl _html/dbase/download/reduce_image_size.tar.gz

Reimar

--
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg-i/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
Re: clipping images with TV? [message #34410 is a reply to message #34328] Fri, 07 March 2003 07:50 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
egraves@socrates.Berkeley.EDU (Ted Graves) writes:
>> Are aou speaking from something like
>>
>> ;+
>> ; NAME:
>> ; reduce_image_size
>> ;
>> ; PURPOSE:
>> ; This function returns the mask to reduce the white space around a given
>> image
>
> Maybe I should have better elucidated what I want to do. I'm displaying
> an image with overlaid annotation and ROIs. When I display this to a draw
> widget, obviously anything that lays outside the window is not drawn. I
> want this to extend to when I display on a postscript page, so that parts
> of the image/ROI/annotation that lay outside a given area are not drawn.
> For PLOTS and XYOUTS, you can specify a clipping window using the CLIP
> keyword, so that graphics outside this window are not drawn. I was
> wondering if there was a simple way to do this for images as well, because
> (at least in IDL 5.4) the CLIP keyword does not apply to the TV procedure.

Something like PLOTIMAGE may suit you. You specify the X and Y
extents of the image using IMGX/YRANGE, and then can use the standard
XRANGE and YRANGE keywords to clip the image to a smaller size if you
desire. You get a coordinate system for free, but you can turn off
coordinate axes as you normally would with any PLOT command (XSTYLE=4,
YSTYLE=4).

Craig

http://cow.physics.wisc.edu/~craigm/idl/idl.html (under graphics)

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: routine_info does not work with functions
Next Topic: Temporary Positions - IDL QA Engineers

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

Current Time: Sat Oct 11 03:53:56 PDT 2025

Total time taken to generate the page: 0.55964 seconds