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

Home » Public Forums » archive » IDLanROI:Computemask , bug or featur???
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
IDLanROI:Computemask , bug or featur??? [message #52800] Sat, 03 March 2007 18:37
Weihua FANG is currently offline  Weihua FANG
Messages: 26
Registered: January 2006
Junior Member
hi, all,

when testing the ComputeMask method of IDLanROI, something odd
happened. i.e.t, the value of Location can change the behavour of the
method, with unexpected output. note the only difference between the
test1.pro and test2.pro is location value, but the output of test2 is
weird.

when data_array is more complex polygon, things could be really
messy.

Any thoughts?

pro test1

data_array = fltarr(2,3)
data_array[*,0] = [201, 1]
data_array[*,1] = [ 1, 201]
data_array[*,2] = [201, 500]
oROI = OBJ_NEW( 'IDLanROI')

oROI -> SetProperty, data = data_array [0:1, *]
mask_tmp = oROI->ComputeMask(Dimensions = [200,500], $
Location = [ 0,200], $
PIXEL_CENTER = [0.5,0.5])
tvscl, mask_tmp
OBJ_DESTROY, oROI

end


pro test2

data_array = fltarr(2,3)
data_array[*,0] = [201, 1]
data_array[*,1] = [ 1, 201]
data_array[*,2] = [201, 500]
oROI = OBJ_NEW( 'IDLanROI')

oROI -> SetProperty, data = data_array [0:1, *]
mask_tmp = oROI->ComputeMask(Dimensions = [200,500], $
Location = [ 0,201], $
PIXEL_CENTER = [0.5,0.5])
tvscl, mask_tmp
OBJ_DESTROY, oROI

end
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Optimizing a lookup table
Next Topic: Any known bug with PS output?

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

Current Time: Wed Oct 08 15:52:02 PDT 2025

Total time taken to generate the page: 0.00531 seconds