xroi large images [message #42626] |
Thu, 17 February 2005 02:58  |
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
|
|
|