Re: CURSOR skips a few beats :-( [message #69622 is a reply to message #69621] |
Fri, 29 January 2010 09:21   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Gianguido Cianci writes:
> Some quick background about the project. We are taking micrographs of
> tissue samples (mostly skin). I am writing a set of IDL programs that
> would allow others in the lab to draw two curves on the picture, say
> along the lumen and along the edge of some skin layer, and then
> calculate the thickness of that part of the skin. I define thickness
> as the shortest path from each point in the lumen line to any point in
> the inner line. So far so good.
>
> The problem is that without the interpolation above, while you move
> along a straight-ish part of the tissue (you can therefore move faster
> with less error) you get a few points. On the other hand, if there is
> a part of the tissue that is convoluted (and the user instinctively
> slows down) you get more, or even every, point the mouse visits. This
> behaviour would bias the average thickness value toward the thickness
> of convoluted parts of the tissue, and that's not cool.
I can see problems with this approach. What about allowing the
user to actually measure the distance themselves with some kind
of measuring tool? (You can look to AnnotateWindow again, or to
the Catalyst example application for an example of such a tool.)
The user could click in one location, and move the cursor (the
tool now follows the user's movements) to another location and
click to record the measurement. You could take any number of
measurements, then do statistics on the measurements to get
an accurate value. This avoids a lot of problems, and gives
the user a sense of what they are *actually* doing. And, it is
easier to select individual points then it is to draw a line
on a computer.
> What do you guys think? I fear I may be reinventing a few wheels,
> maybe a whole set of wheels.
If you continue to do this with the CURSOR command, it will
be like reinventing us all the way back to the stone age. :-)
> pp - your way seems much simpler to read... I am starting to see why
> these here objects are cool... I will investigate further.
Objects are cool, although I think the IDLanROI object is
probably the wrong tool for the job here.
But, seriously, Gianguido, my friend, if you don't start
writing this program as a widget program of some kind, your
users are going to end up hating you. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|