The Gray-Level Size Zone Matrix (GLSZM) is a rotation-invariant, higher-order texture matrix that counts the number of connected components—or 'zones'—consisting of voxels with identical discretized gray-level values. Unlike the Gray-Level Run Length Matrix (GLRLM), which requires a specific directional vector, the GLSZM evaluates adjacency in all three dimensions simultaneously, making it uniquely suited for quantifying the volume of homogeneous tissue clusters in volumetric medical scans.
Glossary
Gray-Level Size Zone Matrix (GLSZM)

What is Gray-Level Size Zone Matrix (GLSZM)?
A Gray-Level Size Zone Matrix (GLSZM) is a statistical texture analysis matrix that quantifies the size of connected, homogeneous regions sharing the same gray-level intensity within an image, independent of their directional orientation.
From the constructed matrix, advanced statistical features such as Zone Size Non-Uniformity (ZSNU) and Gray-Level Non-Uniformity (GLNU) are derived to characterize tissue heterogeneity. A high ZSNU value indicates a wide variation in the size of homogeneous zones, often correlating with aggressive tumor necrosis, while a low value suggests a fine, uniform texture. This makes GLSZM a critical component of radiomic signatures for predicting clinical endpoints in oncology.
Key Characteristics of GLSZM
The Gray-Level Size Zone Matrix (GLSZM) is a higher-order statistical texture matrix that quantifies the size of connected, homogeneous regions within a region of interest, independent of their directional orientation.
Zone Definition and Connectivity
A zone is defined as a connected group of voxels sharing the exact same discretized gray-level intensity. Connectivity is typically assessed in 3D using 26-connectivity (all adjacent voxels sharing a face, edge, or corner) or in 2D using 8-connectivity. Unlike the Gray-Level Run Length Matrix (GLRLM), which measures linear runs in specific directions, GLSZM is rotationally invariant—the shape and orientation of the zone do not matter, only its size. This makes GLSZM particularly suited for capturing structural heterogeneity in tumors where necrotic cores or cystic regions form irregular, non-directional clusters.
Matrix Construction and Dimensions
The GLSZM is a two-dimensional matrix where:
- Rows (Ng): Represent each discretized gray-level value present in the ROI.
- Columns (Ns): Represent each possible zone size, from 1 up to the maximum zone size found.
- Element P(i,j): Contains the total count of zones with gray level i and size j.
The matrix is fundamentally different from GLCM and GLRLM because a single large homogeneous region contributes only one count to the matrix, regardless of how many voxels it contains. This makes GLSZM highly sensitive to the presence of large uniform areas rather than frequent small textures.
Key Derived Features
Several quantitative features are extracted from the normalized GLSZM to characterize tissue architecture:
- Small Zone Emphasis (SZE): Measures the distribution of small zones. Higher values indicate finer, more granular textures.
- Large Zone Emphasis (LZE): Measures the distribution of large zones. Higher values indicate coarser, more homogeneous structural regions.
- Zone Size Non-Uniformity (ZSNU): Quantifies the variability of zone sizes across the image. Lower values mean more uniformity in zone size distribution.
- Gray-Level Non-Uniformity (GLNU): Measures the variability of gray-level intensities among zones. Higher values indicate greater heterogeneity in intensity values.
- Zone Percentage (ZP): The ratio of the number of zones to the total number of voxels, indicating textural coarseness.
Clinical Relevance in Oncology
GLSZM features have demonstrated significant prognostic value in oncology imaging:
- Tumor Heterogeneity: Large Zone Emphasis correlates with necrotic or cystic regions in tumors, which are often associated with aggressive phenotypes and poor prognosis.
- Treatment Response: Changes in Zone Size Non-Uniformity during therapy can indicate tumoral structural reorganization before volumetric shrinkage is visible.
- Histological Correlates: High Gray-Level Non-Uniformity has been linked to increased cellularity and nuclear atypia on histopathology.
- Non-Small Cell Lung Cancer: GLSZM features have been validated as independent predictors of overall survival and distant metastasis in multiple cohorts.
Pre-Processing Dependencies
GLSZM calculation is highly sensitive to pre-processing parameters, which must be standardized per IBSI guidelines:
- Intensity Discretization: The number of gray-level bins directly impacts zone formation. Fixed bin width (e.g., 25 HU) is preferred over fixed bin count for cross-scanner reproducibility.
- Voxel Resampling: Non-isotropic voxels distort zone size measurements. Resampling to isotropic 1×1×1 mm³ or 2×2×2 mm³ voxels is mandatory.
- HU Rescaling: For CT, absolute Hounsfield Unit rescaling ensures consistent tissue density thresholds across scanners.
- Outlier Filtering: Extreme intensity outliers can fragment zones artificially. 3-sigma outlier removal or intensity clipping is often applied.
GLSZM vs. GLRLM: Key Distinction
While both matrices quantify homogeneous regions, they capture fundamentally different structural properties:
- GLRLM: Counts directional runs of consecutive pixels. A long, thin structure aligned with the measurement direction produces a long run. The same structure measured perpendicularly produces short runs. GLRLM is directionally dependent.
- GLSZM: Counts connected zones regardless of shape or orientation. A long, thin structure produces a zone equal to its total area, independent of measurement angle. GLSZM is rotationally invariant.
- Practical Impact: GLSZM is preferred for quantifying blob-like or irregular heterogeneous regions (necrosis, cysts), while GLRLM excels at capturing linear or directional structures (fibrotic bands, vascular tracts).
GLSZM vs. Other Texture Matrices
Structural and computational comparison of the Gray-Level Size Zone Matrix against other core second-order and higher-order texture matrices used in radiomic feature extraction.
| Feature | GLSZM | GLCM | GLRLM | NGTDM |
|---|---|---|---|---|
Primary Quantification | Size of homogeneous connected zones | Pairwise pixel co-occurrence frequency | Length of consecutive pixel runs | Difference between pixel and neighborhood mean |
Directional Dependence | Rotationally invariant | Directionally dependent (0°, 45°, 90°, 135°) | Directionally dependent | Rotationally invariant |
Matrix Dimensionality | N_g × N_z (variable columns) | N_g × N_g (square matrix) | N_g × N_r (variable columns) | N_g × 1 (column vector) |
Captures Regional Heterogeneity | ||||
Computational Complexity | O(N_p) single-pass | O(N_g²) per direction | O(N_p) per direction | O(N_p × k²) with k-neighborhood |
Sensitive to Intensity Discretization | ||||
IBSI Standardized Features | 16 features | 25 features | 16 features | 5 features |
Typical Clinical Application | Tumor heterogeneity quantification | Tissue contrast and local uniformity | Structural coarseness in lesions | Regional intensity variation |
Frequently Asked Questions
Explore the fundamental concepts behind the Gray-Level Size Zone Matrix, a critical tool for quantifying regional heterogeneity in medical imaging and texture analysis.
A Gray-Level Size Zone Matrix (GLSZM) is a second-order texture matrix that quantifies the size of connected regions of identical gray-level intensity, independent of their directional orientation. Unlike the Gray-Level Run Length Matrix (GLRLM), which measures runs in specific directions, the GLSZM is rotationally invariant. The algorithm scans the entire 2D or 3D image volume to identify contiguous zones—connected components where all pixels or voxels share the exact same discretized intensity value. The resulting matrix has rows representing gray levels and columns representing zone sizes; the entry P(i,j) counts the number of zones with gray level i and size j. This structure makes it exceptionally powerful for characterizing the coarseness and structural heterogeneity of tissues, such as distinguishing between a homogeneous solid tumor and a necrotic, heterogeneous mass.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Understanding the Gray-Level Size Zone Matrix requires familiarity with the foundational texture matrices and pre-processing steps that define quantitative radiomics.
Gray-Level Run Length Matrix (GLRLM)
A precursor texture matrix that quantifies consecutive runs of identical gray levels in a specific direction. While GLSZM measures the size of connected zones regardless of angle, GLRLM captures directional coarseness. A homogeneous tissue will yield long runs in GLRLM and large zones in GLSZM, but GLSZM provides a rotationally invariant alternative that is often more robust to patient positioning.
Intensity Discretization
A mandatory pre-processing step where continuous Hounsfield Unit values are binned into a finite number of gray levels. The bin width directly controls GLSZM matrix dimensions:
- Fine discretization (e.g., 64 bins): Preserves subtle texture but increases matrix sparsity
- Coarse discretization (e.g., 8 bins): Reduces noise but may merge distinct tissue zones IBSI guidelines recommend a fixed bin width of 25 HU for CT radiomics to ensure cross-study comparability.
Neighborhood Gray-Tone Difference Matrix (NGTDM)
A complementary texture matrix that quantifies the difference between a voxel's intensity and its surrounding neighbors. While GLSZM counts connected homogeneous zones, NGTDM measures local intensity variation. A tissue with large GLSZM zones (high homogeneity) will typically exhibit low NGTDM busyness values. Using both matrices together provides a more complete texture signature.
Gray-Level Co-occurrence Matrix (GLCM)
A second-order statistical method that captures pairwise spatial relationships between voxel intensities at defined offsets. Unlike GLSZM's focus on connected region size, GLCM quantifies contrast, correlation, and local patterns. A tumor with large GLSZM zones may still exhibit high GLCM contrast if zone boundaries are sharp, making the two matrices complementary for capturing intratumoral heterogeneity.
Feature Harmonization (ComBat)
A statistical batch-effect correction method that removes scanner-induced variability from GLSZM features. Without harmonization, identical tissue scanned on different CT models can produce divergent zone size metrics. ComBat estimates and removes the additive and multiplicative scanner effects while preserving biological variability, enabling multi-center radiomic studies to pool GLSZM data reliably.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us