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

Home » Public Forums » archive » Re: cw_defroi vertices.
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: cw_defroi vertices. [message #30361 is a reply to message #30359] Thu, 18 April 2002 10:07 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Higgins (dmh@medphysics.leeds.ac.uk) writes:

> I have been using DEFROI to define a region of interest, and then
> using xVerts and yVerts in the line that follows:
>
> area=DEFROI(m,n,xVerts,yVerts)
> ROI=OBJ_NEW('IDLanROI', xVerts, yVerts, type=2); type two
> ;is a closed polygon
>
> I want to be able to use cw_defroi instead because I am updating a
> draw widget.
> Something like
> area = cw_defroi(info.drawID)
>
> Obviously xVerts and yVerts are no longer defined, and it seems that
> the "area" array is the wrong dimensions to be used with the "data"
> keyword in the initialization of "ROI" (above).
>
> Does anyone know how I should input the vertices of the region of
> interest when initializing "ROI"?

You can turn your "area" into xVerts and yVerts like this.
(I assume your image is an m-by-n array.)

xVerts = area MOD m
yVerts = area / m

These will be in device (pixel) coordinate space.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Previous Topic: filling holes in blobs quickly
Next Topic: file i/o help

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

Current Time: Fri Oct 10 22:15:29 PDT 2025

Total time taken to generate the page: 1.44688 seconds