Hierarchical K-means Clustering for MRI Lung Imaging
Version 1.0211 (4.16 KB) by
Christine Poon
This code performs hierarchical k-means clustering for MRI lung imaging analysis
This code performs hierarchical k-means clustering to quantify fractional ventilation and facilitate assessment of ventilation defect percentages in lung MRI images. The methodology is a direct translation of the method described by Kirby et al 2012 (Hyperpolarized 3He Magnetic Resonance Functional Imaging Semiautomated Segmentation), with various options for displaying and saving the cluster maps as well as exporting a tabular summary of cluster sizes. This work was developed as part of a suite of image analysis codes between February-May 2024 and is suitable for PREFUL image and contrast agent-based e.g. helium MRI image analysis. Please run with Matlab Image Processing and Mapping Toolboxes. Sample outputs from the accompanying documentation:
N.B. The k-means function currently does not sort the centroid clusters. Please add a script to do this after each round of clustering (hint: apply the sort function and a simple for loop) or contact the author for the solution. The original code also plots and analyses histogram distributions of the voxel intensities.
Cite As
Christine Poon (2025). Hierarchical K-means Clustering for MRI Lung Imaging (https://uk.mathworks.com/matlabcentral/fileexchange/168256-hierarchical-k-means-clustering-for-mri-lung-imaging), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0211 | Updated description to include sample outputs |
||
| 1.021 | Edited description as there were some formatting issues while editing on mobile! |
||
| 1.0.2 | Updated description regarding cluster sorting and to clarify the timeframe over which the code was developed |
||
| 1.0.1 | Updated description |
||
| 1.0.0 |
