Re: clipping images with TV? [message #34328] |
Thu, 06 March 2003 07:55  |
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 #34410 is a reply to message #34328] |
Fri, 07 March 2003 07:50  |
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
------------------------------------------------------------ --------------
|
|
|