Stereology¶
Counts model material occurrences at grid intersection points to calculate surface-area fractions. Results can be exported to MATLAB or Excel.
Overview¶
The Stereology tool overlays a regular grid on the image, identifies grid intersection points, and counts how many intersections fall on each model material. From these counts it calculates surface fractions and surface area estimates per material.
Launch via Ribbon → Tools → Stereology.
Workflow:
- Segment objects of interest into a Model layer
- Generate a grid (stored in the Mask layer) with
- Run the analysis with
Grid units panel¶
Selects the unit system for all grid size and offset values.
- — all grid values are in pixels (default)
- — all grid values are in the physical units defined in Dataset → Parameters (e.g., µm)
Grid settings panel¶

Defines the geometry of the grid. - — horizontal distance between grid lines (default 50 pixels). - — vertical distance between grid lines (default 50 pixels).
- — when checked, the grid is centred in the image (equal margins on all sides); when unchecked, the grid starts at the X offset / Y offset position.
- — horizontal offset of the first grid line from the image edge (non-centred mode only).
- — vertical offset of the first grid line from the image edge (non-centred mode only).
- — additional dilation (in pixels) applied to each grid line via a cross-shaped structuring element. Use
0for a single-pixel grid.
Warning
When Grid extra thickness is 0, the grid is only visible at ≥ 100% magnification. Increase it to see the grid at lower zoom levels.
— creates the grid and writes it to the Mask layer. If a mask already exists, you are asked to confirm before overwriting. The grid can be undone with Ctrl+Z.
Info
The mask layer display style (contours vs. solid) can be changed at
Ribbon → Home → Preferences → Colors and styles → Masks → show as contours.
Stereology settings panel¶
Controls how the analysis is performed and where results are exported.
Export results to (radio buttons):
- — after analysis, prompts for a workspace variable name and assigns the results structure to it (default).
- — saves results to a
.xlsfile; prompts for a save path.
Options:
- — radius (in pixels) of the filled circle stamped on each grid intersection in the result model layer (default 6).
- — also counts annotation labels from the Segmentation Panel → Annotations at each grid intersection. The counts are added to the exported structure under
results.Annotations. - — when checked, intersection counts for boundary grid cells (cells partially outside the image) are scaled by the fraction of the cell area that lies inside the image. This corrects surface fraction estimates for grids that don't divide the image evenly.
— runs the analysis. Requires:
- A Mask layer containing a grid (created by )
- A Model layer with labeled materials
Results are written back to the Model layer (intersection dots per material) and exported to MATLAB or Excel.
Exported results structure¶
The MATLAB results structure contains:
| Field | Description |
|---|---|
Occurrence |
[time × depth × materials] array of raw intersection counts |
SurfaceFraction |
[time × depth × materials] fraction of intersections per material |
Surface_in_units |
[time × depth × materials] surface area estimate in physical units² |
GridSize |
Grid step in pixels (pixelsX, pixelsY) and units (unitsX, unitsY, unitsType) |
Materials |
Cell array of material names |
Filename |
Path to the source image |
ModelName |
Path to the model file |
CenteredGrid |
true if the centred-grid option was used |
ScaleToImage |
true if boundary scaling was applied |
Annotations |
(optional) annotation label counts; present when Include annotations is checked |
Back to MIB | User interface | Ribbon | Tools


