3D IDLanROI [message #65639] |
Fri, 13 March 2009 13:25 |
tegus
Messages: 20 Registered: October 2008
|
Junior Member |
|
|
Hi,
I'm having difficulty applying IDLanROI to a set of 3D data. In the
past, I have used IDLanROI sucessfully with 2D data.
Working in 2D with a simple square ROI is OK:
IDL> print, verts2D
1.00000 1.00000
-1.00000 1.00000
-1.00000 -1.00000
1.00000 -1.00000
IDL> oROI=obj_new('IDLanROI', verts2d)
IDL> print, oROI->ContainsPoints(verts2D)
3 3 3 3
IDL> print, oROI->ContainsPoints([0, 0])
1
IDL> print, oROI->ContainsPoints([0, 2])
0
Indicating test point(s) are on vertex (3), interior to ROI (1) and
exterior to ROI (0) as I would expect.
Extending this to 3 dimensions and using a simple square pyramid as my
ROI:
IDL> print, verts3D
1.00000 1.00000 0.000000
-1.00000 1.00000 0.000000
-1.00000 -1.00000 0.000000
1.00000 -1.00000 0.000000
0.000000 0.000000 1.00000
IDL> oROI=obj_new('IDLanROI', verts3d)
IDL> print, oROI->ContainsPoints(verts3D)
0 0 0 0 0
Which isn't right. What am I doing incorrectly?
Is it the way I have defined the vertices of my pyramid?
Any help would be greatly appreciated.
Thanks,
Bill
|
|
|