Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Make eccentricity more similar to elongation #1743

Merged
merged 1 commit into from
May 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Examples/LabelGeometryMeasures.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,13 @@ LabelGeometryMeasures(int argc, char * argv[])
// Get principal moments and use them to calculate eccentricity and axes lengths
auto principalMoments = labelObject->GetPrincipalMoments();

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

Expand Down