IDLanROI:Computemask , bug or featur??? [message #52800] |
Sat, 03 March 2007 18:37 |
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
|
|
|