Re: Annoying ROIs [message #53491] |
Wed, 18 April 2007 08:41  |
Haje Korth
Messages: 651 Registered: May 1997
|
Senior Member |
|
|
Maybe IDLanROI should be renamed to IDLanNOY? :)
"Robbie" <retsil@iinet.net.au> wrote in message
news:1176884972.810946.280640@n76g2000hsh.googlegroups.com.. .
>
> I've been using IDLanROI and IDLgrROI for a while and each time I use
> them I come to a different conclusion as to how they actually work. I
> seem to always get slightly offset masks from ComputeMask when I
> compare the mask and verticies on object graphics.
>
> I've written a small article and program to demonstrate the problem.
> http://barnett.id.au/idl/annoying_rois/annoying_rois.html
>
> Robbie
>
|
|
|
|
|
Re: Annoying ROIs [message #53494 is a reply to message #53493] |
Wed, 18 April 2007 08:20   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> IDLanROI and CONVERT_COORD are separated in time and place
> by about 20 years of software development. I suppose
> reasonable people can make good arguments about whether
> a pixel "location" refers to the center of the pixel or
> to some point along its edge. Here, clearly, two software
> developers made different decisions. My guess would be,
> and I have no data to support it, that centered pixels
> probably make more sense (and follow the convention of
> much modern software, including OpenGL, probably) in
> object graphics than it originally did in direct graphics.
OK, now I see I completely misread your article.
I take back everything I said.
I'm going back to bed... :-(
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.")
|
|
|
Re: Annoying ROIs [message #53496 is a reply to message #53494] |
Wed, 18 April 2007 08:10   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Robbie writes:
> I've been using IDLanROI and IDLgrROI for a while and each time I use
> them I come to a different conclusion as to how they actually work. I
> seem to always get slightly offset masks from ComputeMask when I
> compare the mask and verticies on object graphics.
>
> I've written a small article and program to demonstrate the problem.
> http://barnett.id.au/idl/annoying_rois/annoying_rois.html
It's pretty clear I got up on the wrong side of the
bed this morning because my usual early morning stroll
though the newsgroup has left me irritable and annoyed.
I really dislike the often sanctimonious tone of "perversion"
articles. If I had to spend all my time thinking about
and protecting my programs from the unintended consequences
of people who intend to use them in perverse ways, I would
never write another line of code. I'd find something else
to do.
Anyway...
While Robbie's complaint doesn't fall exactly in this
category, he is going to suffer the brunt of my irritation
this morning. (Reminds me of baboon behavior in a very
interesting book I've been reading this week.)
IDLanROI and CONVERT_COORD are separated in time and place
by about 20 years of software development. I suppose
reasonable people can make good arguments about whether
a pixel "location" refers to the center of the pixel or
to some point along its edge. Here, clearly, two software
developers made different decisions. My guess would be,
and I have no data to support it, that centered pixels
probably make more sense (and follow the convention of
much modern software, including OpenGL, probably) in
object graphics than it originally did in direct graphics.
Since these two graphics systems were COMPLETELY different,
the opportunity to choose a convention that made things easier
in object graphics probably trumped the desire to have a single
convention for IDL.
Since CONVERT_COORDS is so useful, I understand why you use
it. But I don't thing the person who designed the object graphics
system even knew it existed. He probably assumed that if you
knew anything about object graphics at all, you would probably
be writing your own conversion routines. (I can agree it was
a lousy assumption, but I can see him making it. People who
design complete graphics systems sometimes have a hard time
imagining how the rest of us think.)
I can believe you are annoyed, but I also think you should get
over it. There are one or two things about IDL that annoy me, too. :-)
I would get behind a movement to ask ITTVIS to write a
CONVERT_COORD routine for object graphics. It could be very,
very useful.
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.")
|
|
|
Re: Annoying ROIs [message #53576 is a reply to message #53491] |
Wed, 18 April 2007 16:26  |
Robbie
Messages: 165 Registered: February 2006
|
Senior Member |
|
|
I never thought that annoying would ever be interpreted as such a
strong word, it was merely a play on words. It's more an itch, which
get worse with lower resolution images. I'm actually not saying that
IDL is wrong here, all I have really shown is how to offset IDLgrROI
by half a pixel in the same way that I would offset plots by half a
pixel.
Curiously, I'm supposed to be presenting an abstract next week in
which I have reported that I can copy ROIs from one Nuclear Medicine
scan to another with an average of 1 pixel accuracy. I wanted to make
sure I have this issue resolved before presenting.
P.S, For those who haven't realised, I'm babbling on about the
xcoord_conv=xscale and ycoord_conv=yscale keywords to object graphics.
Not the CONV_COORD function.
More riveting details available at
http://barnett.id.au/idl/annoying_rois/
Robbie
|
|
|