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 
Switch to threaded view of this topic Create a new topic Submit Reply
xroi large images [message #42626] Thu, 17 February 2005 02:58 Go to next 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
Re: xroi large images [message #42681 is a reply to message #42626] Fri, 18 February 2005 06:21 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Karsten Rodenacker writes:

> 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?

I haven't really looked at the XROI code, but I suspect
it will have to be modified so that in the section dealing
with MOTION events associated with drawing the rubberband
box you are also looking to see if the viewport needs to
be moved. No time this morning to check to see if this
is easy or extremely hard. XROI has never really been my
favorite example of well-written IDL code. :-)

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
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 17:51:18 PDT 2025

Total time taken to generate the page: 0.00491 seconds