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 #30359] Thu, 18 April 2002 09:17 Go to previous message
Ted Cary is currently offline  Ted Cary
Messages: 53
Registered: October 2001
Member
"David Higgins" <dmh@medphysics.leeds.ac.uk> wrote in message
news:<a03a1bd.0204180834.4fbdc03d@posting.google.com>...

> I want to be able to use cw_defroi instead because I am updating a

> draw widget.

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

>

> TIA

> Dave Higgins

Hello,

You could use my lab's modified version of CW_DEFROI, which will optionally
return the vertices. There's also an option to draw rubber band lines in
polygon mode, and a few more modifications. I can send it to you as soon as
I get to work, if you want.

I believe the reason the "area array" returned by your CW_DEFROI is of the
wrong dimensions to put into an IDLanROI is that it is a 1D vector of array
subscripts. You can convert these into x and y vectors if you know your
image dimensions--see Fanning's website (just MOD the "area" vector by
x-width to get the x vector and divide by x-width to get y.)

If you do put this area/interior data into your ROI, you'll probably want to
change the TYPE. I know there's a TYPE which treats the data as points, but
I don't know the number to use offhand. However, if you want to continue to
use ROIs of TYPE 2 (closed polygon), you'll need the vertices. Either use
the modified CW_DEFROI or write your own code to draw the region (not a bad
idea, since CW_DEFROI uses its own crash-prone event loop)--I don't think
contouring the area is the best approach.

(I don't have IDL at this computer, so I'm not sure of all of the above
advice... )

Hope this helps,
[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: Wed Oct 08 18:36:11 PDT 2025

Total time taken to generate the page: 0.00416 seconds