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

Home » Public Forums » archive » Using defroi on a zoomed image
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Using defroi on a zoomed image [message #85821 is a reply to message #85820] Wed, 11 September 2013 20:22 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
dotis@mail.usf.edu writes:

>
> I am trying to display and image using tvscl and then define an irregular roi using defroi. However, the image to be displayed is small and I want to zoom in on the image and then define the roi. Here is the code:
>
>
> xsize=255
> ysize=238
> restore,'TB_bath.dat'; Contains variable TB_bath(255,238)
> window,0,xsize=xsize,ysize=ysize
> loadct,13
> tvscl,TB_bath<(-3)>(-7)
> zoom,xsize=xsize,ysize=ysize,/keep
> x=defroi(xsize,ysize)
>
>
> This does the zoom just fine, but then I need to exit out of the zoom window before I can define the roi. I want to define the roi on the zoomed image.
>
> Any ideas are appreciated. Thanks,

I would do it like this:

image = cgdemodata(11)
help, image
;;IMAGE BYTE = Array[248, 248]
cgdisplay, 248*4, 248*4
cgimage, image
x=defroi(248, 248, zoom=4)
;;% DEFROI: Left button to mark point
;;% DEFROI: Middle button to erase previous point
;;% DEFROI: Right button to close region

; To check if we have done this correctly.
snap = image
snap[x]=0
cgdisplay, 200, 200, wid=1
cgimage, snap


Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Previous Topic: LABEL_REGION on large array --> segmentation fault, please HELP !!
Next Topic: pointer to function

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

Current Time: Thu Oct 09 20:04:07 PDT 2025

Total time taken to generate the page: 0.64166 seconds