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

Home » Public Forums » archive » xroi large images
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
xroi large images [message #42626] Thu, 17 February 2005 02:58 Go to previous message
Karsten Rodenacker is currently offline  Karsten Rodenacker
Messages: 98
Registered: July 1997
Member
I have a small problem to draw in xroi a box if the image is large and
hence displayed with scroll bars. Is there any knowledge how to draw the
box into the image not displayed?

Thanks in advance
Karsten

I am using a small routine:

function xroi_pick, image, box=box, square=square
xroi,bytscl(image),regions_out=r,/block,tools='Rectangle'
if obj_valid(r) then begin
r->getProperty,data=d
xmin=min(d[0,*],max=xmax)
ymin=min(d[1,*],max=ymax)
box=[xmin,ymin,xmax,ymax]
obj_destroy,r
if keyword_set(square) then begin
dx=xmax-xmin+1
dy=ymax-ymin+1
if dx lt dy then box=[xmin,ymin,xmax,ymin+dx-1] $
else box=[xmin,ymin,xmin+dy-1,ymax]
endif
return,n_elements(size(image,/dim)) eq 2? $
image[xmin:box[2],ymin:box[3]]:image[*,xmin:box[2],ymin:box[ 3]]
endif else return, -1l
end


--
Karsten Rodenacker
------------------------------------------------------------ -------- :-)
GSF - Forschungszentrum Institute of Biomathematics and Biometry
D-85758 Oberschleissheim Postfach 11 29
Karsten.Rodenacker@gsf.de | http://ibb.gsf.de/
http://ibb.gsf.de/homepage/karsten.rodenacker/
Tel: +49 89 31873401 | FAX: ..3369
[Message index]
 
Read Message
Read Message
Previous Topic: 2D color graphs / strips in IDL
Next Topic: Re: textures and direct graphics ?

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

Current Time: Wed Oct 08 19:42:41 PDT 2025

Total time taken to generate the page: 0.00420 seconds