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

Home » Public Forums » archive » IDL ROI Objects
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: IDL ROI Objects [message #90104 is a reply to message #90101] Tue, 27 January 2015 15:10 Go to previous messageGo to previous message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 27.01.2015 19:53, David Fanning wrote:
> The ROI code has a left-bottom bias.

Disclaimer: I did not read the original poster code, because it is not
close enough to a "minimal working example" for my taste, but IDLanROI
has a pixel centered convention, and a "pixel area convention" (a pixel
touched is a masked pixel):

IDL> x = [0., 0., 0., 0., 0.]
IDL> y = x
IDL> roi = OBJ_NEW('IDLanROI', x, y)
IDL> print, roi->ComputeMask(DIMENSIONS=[3,3])
255 0 0
0 0 0
0 0 0
IDL> roi = OBJ_NEW('IDLanROI', x-0.49, y-0.49)
IDL> print, roi->ComputeMask(DIMENSIONS=[3,3])
255 0 0
0 0 0
0 0 0
IDL> roi = OBJ_NEW('IDLanROI', x+0.49, y+0.49)
IDL> print, roi->ComputeMask(DIMENSIONS=[3,3])
255 0 0
0 0 0
0 0 0
IDL> roi = OBJ_NEW('IDLanROI', x+0.51, y+0.51)
IDL> print, roi->ComputeMask(DIMENSIONS=[3,3])
0 0 0
0 255 0
0 0 0

If you discovered a bug, can you try to reproduce it in a smaller
example? Since you seem to mix pixel and polygon a little bit, could
your problem be related to some floating point precision issues?

Just my 2c, maybe I missed the point.

Fabien
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Krig2d from point to image
Next Topic: Re: Why did IDL just start crashing

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

Current Time: Wed Oct 08 16:14:31 PDT 2025

Total time taken to generate the page: 0.00392 seconds