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

Home » Public Forums » archive » Re: Annoying ROIs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Annoying ROIs [message #53491] Wed, 18 April 2007 08:41 Go to next message
Haje Korth is currently offline  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 #53492 is a reply to message #53491] Wed, 18 April 2007 09:33 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paolo Grigis writes:

> I hope these articles will not lead to the newsgroup
> being X rated ;-)
>
> I'll try to keep an eye on my posting and check for
> adult content in the future...

I've been sentenced to purgatory for my injudicious comments
this morning. I'll let you know when I get back. :-(

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 #53493 is a reply to message #53491] Wed, 18 April 2007 08:20 Go to previous messageGo to next message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
David Fanning wrote:

>
> 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.

I hope these articles will not lead to the newsgroup
being X rated ;-)

I'll try to keep an eye on my posting and check for
adult content in the future...


> 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.
Re: Annoying ROIs [message #53494 is a reply to message #53493] Wed, 18 April 2007 08:20 Go to previous messageGo to next message
David Fanning is currently offline  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 Go to previous messageGo to next message
David Fanning is currently offline  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 Go to previous message
Robbie is currently offline  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
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: loop limit ???
Next Topic: Re: problem with writing a 2D image .tiff

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

Current Time: Wed Oct 08 19:21:06 PDT 2025

Total time taken to generate the page: 0.00647 seconds