Lattice Analysis Tool (LAT)

2D image analysis tool tailored for additively manufactured lattice structures
Updated 2 Jul 2023


Ⓒ Llywelyn Hughes, Cardiff University. 2023

View LAT on File Exchange

The Lattice Analysis Tool (LAT) software is a matlab-based application, which can also be run as a standalone software for non-matlab users. LAT has the capabilities to analyse any image format such as JPEG, PNG & BMP with automatic scaled measurements of the area, diameter, perimeter and centroid of each region, while also calculating averages, standard deviations and planar porosity. The tool has been tailored for additively manufactured lattice structures but also successfully trialed for heat exchanger channels and nanofluidic particle analysis. NOTE: .tif images are incompatible with some functions of the image processing toolbox.

Latest Release

v2.2 - Strut analysis feature to analyse multiple struts in one go.

v2.1 - Automatic binarisation thresholding with Otsu method and removed bug with UIFigure disapearing behind window when uigetfile is used.

v2.0 - Ability to mask boundaries onto a CAD image for direct comparison. Updated UI for an improved and clearer experience.


  1. Matlab App: Recommended installation if user has access to Matlab and the Image Processing Toolbox. Open the LAT.mlappinstall file to automatically install the software into the matlab "My Apps" section.

  2. Standalone Software: Download and install the LATInstaller_web.exe application. This will download the software through Matlab's Runtime Installer Note: It is recommended to restart computer following installation.


  1. Ensure that input image doesn't have too much glare which generates bright spots and can impact binarisation process.
  2. At times an image with too high of a pixel resolution can slow down analysis and impact the interconnectivity of the pixels within the algorithm. In this case, resave the image with the Snipping Tool (or similar).
  3. The heatmap function tends to work best for ordered structures (such as lattices) as opposed to stochastic porosities.
  4. If using the CAD overlay function, ensure that both the Original and CAD images are scaled appropriately.
  5. Note that first startup does tend to lag as matlab initialises figures etc., however speeds up afterwards.


The matlab file LAT.mlapp is also included for user modifications and adaptation of the current application.


Please cite original code for any future developments: Hughes, L. Lattice Analysis Tool (LAT). [v2.2.0] 2023; Available from:

Any issues or queries, please get in touch.



Cite As

Llywelyn Hughes (2024). Lattice Analysis Tool (LAT) (, GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2023a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes

See release notes for this release on GitHub:

See release notes for this release on GitHub:


To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.