Skip to content

Commit f2ccda0

Browse files
authored
Merge pull request #1743 from ANTsX/label_eccentricity
ENH: Make eccentricity more similar to elongation
2 parents 3a788f8 + 9a5f230 commit f2ccda0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Examples/LabelGeometryMeasures.cxx

+7-1
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,13 @@ LabelGeometryMeasures(int argc, char * argv[])
199199
// Get principal moments and use them to calculate eccentricity and axes lengths
200200
auto principalMoments = labelObject->GetPrincipalMoments();
201201

202-
double lambda1 = principalMoments[0];
202+
// define in 3D such that it describes the ellipse with axes propotional to the
203+
// two largest principal moments. This is useful eg for cortex, where the thickness
204+
// is much smaller than the other two dimensions.
205+
//
206+
// Roundness gives a more general measure of deviation from a sphere, including all three dimensions.
207+
//
208+
double lambda1 = principalMoments[ImageDimension - 2];
203209
double lambdaN = principalMoments[ImageDimension - 1];
204210
double eccentricity = 0.0;
205211

0 commit comments

Comments
 (0)