Morphological Features in GlioMap

Shape-Based Features

Notation

1. Area

Measures the total number of non-zero (foreground) pixels in the binary mask:

\[ A = \sum_{x,y} \mathbb{1}[I(x,y) > 0] \]

2. Perimeter

Length of the object's boundary using edge-following (e.g. bwboundaries):

\[ P = \text{Length of boundary pixels} \]

3. Compactness / Form Factor

Measures how closely the shape resembles a perfect circle:

\[ \text{Compactness} = \frac{4\pi A}{P^2} \]

4. Eccentricity

Describes elongation of the ellipse that best fits the shape:

\[ \text{Eccentricity} = \sqrt{1 - \left(\frac{L_{\text{minor}}}{L_{\text{major}}}\right)^2} \]

Values near 0 indicate circular shapes, near 1 indicate line-like shapes.

5. Major Axis Length

Length of the longest diameter of the best-fit ellipse:

\[ L_{\text{major}} = \text{Length of major axis} \]

6. Minor Axis Length

Length of the shortest diameter of the best-fit ellipse:

\[ L_{\text{minor}} = \text{Length of minor axis} \]

7. Elongation / Aspect Ratio

Ratio of major to minor axis lengths:

\[ \text{Elongation} = \text{AspectRatio} = \frac{L_{\text{major}}}{L_{\text{minor}}} \]

8. Solidity

Ratio of actual area to convex hull area, indicating how "filled" the shape is:

\[ \text{Solidity} = \frac{A}{CA} \]

9. Extent / Rectangularity

Ratio of area to bounding box area, representing how well the shape fills the box:

\[ \text{Extent} = \frac{A}{BB_A} \]

10. Convex Area

Area of the convex hull that encloses the object:

\[ CA = \text{Area of smallest convex polygon containing the shape} \]
________________________________________________________________________________________

Topology-Based Features

Notation

1. Euler Number

Measures object connectivity, defined as the number of objects minus number of holes:

\[ \chi = O - H \]

2. Number of Holes

Holes are counted indirectly using Euler number:

\[ H = O - \chi \]

3. Fractal Dimension (Box-Counting)

Quantifies self-similarity and complexity. Using box-counting method:

\[ D = \lim_{\epsilon \to 0} \frac{\log N(\epsilon)}{\log(1/\epsilon)} \]

Where \( N(\epsilon) \) is the number of boxes of size \( \epsilon \) needed to cover the shape.

4. Number of Objects

Counts the number of 8-connected (2D) or 26-connected (3D) foreground regions:

\[ O = \text{Number of connected components in } I(x,y) \]

5. Watershed Segments

Counts the number of distinct watershed basins from the distance-transformed binary image:

\[ W = \text{Number of segments from watershed(-bwdist(mask))} \]

6. Topology Index

Normalized measure of topological complexity per unit area:

\[ \text{TopologyIndex} = \frac{O - H}{A} \]

7. Lacunarity

Measures texture heterogeneity and gap distribution using the gliding-box method:

\[ \mathcal{L} = \frac{\mathrm{Var}(M)}{\mathrm{Mean}(M)^2} + 1 \]

Where \( M \) is the set of box masses (foreground pixel counts) over all positions.

________________________________________________________________________________________

Boundary-Based Shape Features

Notation

1. Boundary Roughness

Ratio of actual perimeter to convex hull perimeter:

\[ \text{Roughness} = \frac{P}{P_c} \]

2. Mean Absolute Curvature

Average of the absolute curvature values along the boundary:

\[ \text{Mean Curvature} = \frac{1}{N} \sum_{i=1}^{N} |k_i| \]

3. Mean Radial Length

Average distance from the centroid to each boundary point:

\[ \text{Mean Radial Length} = \frac{1}{N} \sum_{i=1}^N r_i \]

4. Contour Complexity

Ratio of actual perimeter to the perimeter of an equivalent circle with the same area:

\[ \text{Complexity} = \frac{P}{2 \pi R_{eq}}, \quad \text{where} \quad R_{eq} = \sqrt{\frac{A}{\pi}} \]

5. Mean Distance to Boundary

Same as mean radial length:

\[ \text{Mean Distance} = \frac{1}{N} \sum_{i=1}^N r_i \]

6. Minimum Distance to Boundary

Minimum distance from centroid to boundary points:

\[ \text{Min Distance} = \min_i r_i \]

7. Maximum Distance to Boundary

Maximum distance from centroid to boundary points:

\[ \text{Max Distance} = \max_i r_i \]

8. Standard Deviation of Distances to Boundary

Standard deviation of distances from centroid to boundary points:

\[ \sigma_r = \sqrt{\frac{1}{N-1} \sum_{i=1}^N (r_i - \bar{r})^2} \]

9. Convex Deficiency

Normalized difference between convex hull area and actual area:

\[ \text{Convex Deficiency} = \frac{A_c - A}{A_c} \]

10. Bending Energy

Sum of squared curvature values along the boundary:

\[ \text{Bending Energy} = \sum_{i=1}^N k_i^2 \]

11. Contour Fractal Dimension (Box-Counting)

Estimated fractal dimension of the contour boundary:

\[ D = \lim_{\epsilon \to 0} \frac{\log N(\epsilon)}{\log(1/\epsilon)} \]

Where \( N(\epsilon) \) is the number of boxes of size \( \epsilon \) needed to cover the contour.

12. Boundary Straightness

Ratio of convex hull perimeter to actual perimeter:

\[ \text{Straightness} = \frac{P_c}{P} \]