Hi there,
you might remember my post (courtesy of my good friend paddy) concerning finding the centroid of a 2d shape. (see a couple of weeks back on this forum). Im currently trying to develop a program in IDL to do this, and im getting there. (Thanks to those who helped with the maths, btw). I opted out of centroids of weighted triangles, instead going for the same sort of idea with lines.
Anyway, there seems to be a routine built into IDL that does this, but i cant get it working. The ROI creation tool works fine with my arrays, but the computegeometry::centroid routine doesnt make sense. It seems to output a 0 or 1 to denote sucess or failure (fine,ok), but the (very vauge) explanation of the centroid output seems to imply a single value output.
Now, call me stupid but it thought points on 2d axes were supposed to have 2 coordinates, not 1. The routine listings are total crap and are no help.
Being a physics student and not a computer scientist, im stuck. I also suspect that my syntax is wrong. ANY help anyone can give me would be most appreciated.
Im convinced IDL was just made to annoy people...
Thanks
you might remember my post (courtesy of my good friend paddy) concerning finding the centroid of a 2d shape. (see a couple of weeks back on this forum). Im currently trying to develop a program in IDL to do this, and im getting there. (Thanks to those who helped with the maths, btw). I opted out of centroids of weighted triangles, instead going for the same sort of idea with lines.
Anyway, there seems to be a routine built into IDL that does this, but i cant get it working. The ROI creation tool works fine with my arrays, but the computegeometry::centroid routine doesnt make sense. It seems to output a 0 or 1 to denote sucess or failure (fine,ok), but the (very vauge) explanation of the centroid output seems to imply a single value output.
Now, call me stupid but it thought points on 2d axes were supposed to have 2 coordinates, not 1. The routine listings are total crap and are no help.
Being a physics student and not a computer scientist, im stuck. I also suspect that my syntax is wrong. ANY help anyone can give me would be most appreciated.
Im convinced IDL was just made to annoy people...
Thanks
Comment