| CW_DEFROI (some help for dumb person doing first widget prog...) [message #44749] |
Fri, 15 July 2005 09:05  |
Peter Clinch
Messages: 98 Registered: April 1996
|
Member |
|
|
I realise the ultimate solution is get a book and learn to do it
properly, but for now I crave a little indulgence to help me get
something up and running ASAP by the good ol' "cut and paste examples
method"...
I've used the GUI builder to set up a basic Draw widget and menu setup.
The program reads in the .bmp files it's required to get, after which
I need an ROI to be drawn in the image. CW_DEFROI looks like the
badger, and I add /BUTTON and /MOTION keywords to the Widget_Draw call
in the original .pro file
Next up, in my event handler for the menu option that will activate the
ROI selection, I start with
wDraw=widget_info(event.top, find_by_uname="Draw")
CentreROI=CW_DEFROI(wDraw)
that creates the relevant ROI widget, and the cursor position is updated
when the mouse is over the image, but it doesn't appear to draw anything
on the image. Can anyone one tell me exactly how I'm being Dumb here?
Thanks, Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
|
|
|
|
| Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44832 is a reply to message #44749] |
Tue, 19 July 2005 01:34  |
Peter Clinch
Messages: 98 Registered: April 1996
|
Member |
|
|
David Fanning wrote:
> Well, I completely confused you. Sorry. I don't
> know why I even answered the question. I've never
> once used CW_DEFROI, so I should know I don't have
> a clue how it works. :-(
>
> I'm going back into my hole now. :-)
I blame the Friday/Monday timing. Something should be blamed, and
that's what's getting it!
Thanks for trying, anyway. I'm making s l o o o w progress on it, but
it is progress...
Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
|
|
|
|
| Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44834 is a reply to message #44749] |
Mon, 18 July 2005 12:34  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Peter Clinch writes:
> Oh, hang on... if I do that it crashes on the cw_defroi call
>
> The crashpoint cursor is in the cw_defroi.pro file, at the line
>
> WIDGET_CONTROL, draw, GET_VALUE=win
>
> result is I'm even more confused than I was before... :-(
Well, I completely confused you. Sorry. I don't
know why I even answered the question. I've never
once used CW_DEFROI, so I should know I don't have
a clue how it works. :-(
I'm going back into my hole now. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
|
| Re: CW_DEFROI (some help for dumb person doing first widget prog...) [message #44841 is a reply to message #44749] |
Mon, 18 July 2005 04:00  |
Peter Clinch
Messages: 98 Registered: April 1996
|
Member |
|
|
Peter Clinch wrote:
> result is I'm even more confused than I was before... :-(
Though I'm now wondering if I'm assuming something that's not the
case... Copy/Paste and run the example from the docs, there is no
obvious marking of the ROI in progress until it's been finished. I'd
assumed that you could see work in progress, as you can in the image
iTool. But at least superficially it looks like you can't see where the
ROI goes until it's been finished with RSI's example.
Hmmmm....
Pete.
--
Peter Clinch Medical Physics IT Officer
Tel 44 1382 660111 ext. 33637 Univ. of Dundee, Ninewells Hospital
Fax 44 1382 640177 Dundee DD1 9SY Scotland UK
net p.j.clinch@dundee.ac.uk http://www.dundee.ac.uk/~pjclinch/
|
|
|
|