Posted by
Kenneth Sloan-2 on
Nov 20, 2013; 3:57pm
URL: http://imagej.273.s1.nabble.com/Adding-a-measurement-type-tp5005620p5005621.html
"Circular" is tricky. "Semi-circular" is easier.
If you measure the orientation of an ROI - say by fitting an ellipse which has the same low order moments, then the orientations 0 and pi are interchangeable. So, you can get away with computing the orientation modulo pi - so that all orientations fall in the range [0,pi).
Once you do that, you can apply all standard statistics without difficulty.
BUT…someone will surely come up with a definition of "orientation" for which 0 and pi are distinct.
Then, you need to deal with a fully circular set of value, and you are … screwed.
I don't know how to compute a mean for a set of values in [0, 2pi). Assume the values are:
( pi/8, pi/8, 15pi/8, 15pi/8 )
What's the "average" of these values? If you get pi…is that really the answer you want?
Now, rotate your world by pi/4. What happens to the mean?
I *think* everything works out nicely if you work with orientation modulo pi - but I might be wrong about that. I've never needed to actually implement such an analysis package and there may be "gotchas" that I don't know about.
One point: if you deal with slowly rotating ROI's (say, in an animation), it might not be desirable to have the orientation "flip" at pi - it's more natural to be fully circular. So, you might want to
keep the full range of [0,2pi) for the raw orientation values, but fold to [0,pi) in the statistics.
AS I said…"circular" is tricky.
--
Kenneth Sloan
[hidden email]
On Nov 20, 2013, at 09:00 , Grant Harris <
[hidden email]> wrote:
> I'd like to add a measurement for circular/directional statistics for calculating the average orientation of an area/ROI.
> I'd like to do this so that I can utilize the functionality of the RoiManager and the ResultsTable, e.g. select a number of ROIs, do the measurement, and have the results in a table. Does anyone have an idea on how to do this?
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html