Skip to content

This repository contains MATLAB codes and examples that calculate and visualize the three types of porosity for a Region of Interest. Citing article: Sun et al. (2021), X-ray computer tomography-based porosity analysis: Algorithms and application for porous woody biomass. Powder Technology. https://doi.org/10.1016/j.powtec.2021.05.006

License

qschen/porosity-analysis

Repository files navigation

3D image-based porosity analysis

This instruction describes a set of MATLAB codes that should be used step by step to calculate and visualize the three types of porosity for a Region of Interest (ROI):

  • Envelope porosity
  • Local porosity
  • Directional porosity

Citing our work

If you use our MATLAB codes, please cite the following article that contains details of the methodology:

Quan Sun, Yidong Xia, Jordan Klinger, Robert Seifert, Joshua Kane, Vicki Thompson, Qiushi Chen, "X-ray computer tomography-based porosity analysis: Algorithms and application for porous woody biomass." Powder Technology, 2021. https://doi.org/10.1016/j.powtec.2021.05.006

Instructions for the MATLAB codes

Step 1: Process 3D CT scan images using FIJI and export binary black/white (BW) slices. Refer to https://github.com/idaholab/LIGGGHTS-INL/tree/inl/tools/FIJI for step-by-step instructions.

Step 2: Import BW slices of the ROI and export in MATLAB data format: run Step2_import_bw_slices.m to import the BW slices as a matrix and export in a *.mat file.

Step 3: Run Step3_local_porosity.m to calculate the local porosity.

Step 4: Run Step4_directional_porosity.m to calculate directional porosity and envelope porosity.

Step 5: Run Step5_plot_local_porosity.m to plot local porosity.

Step 6: Run Step6_plot_directional_porosity.m to plot directional porosity.

Step 7: Run Step7_export_voxel_list.m to export the central coordinates of each voxel.

Note: Each file contains some user-specified inputs (e.g., kernel size n = * and the type = '**')

User tutorials

Two step-by-step user tutorials are provided.

Example 1: ROI of loose sphere packing

Copy all the MATLAB files (*.m) to a new working directory.

Step 1:

For this example, B/W images are provided. Therefore, FIJI is not needed for this example. Skip this step.

Step 2:

Run Step2_import_bw_slices.m to import image slices from the folder Example_1/BW_images.

A MAT data file is exported. Reference: Example_1/Benchmark_Results/Loose_packing.mat.

Step 3:

Run Step3_local_porosity.m to calculate the local porosity using kernel size L_e = 5 voxels (set n = 5, type = 'Loose').

A MAT data file is exported. Reference: Example_1/Benchmark_Results/Loose_porosity_5.mat.

Step 4:

Run Step4_directional_porosity.m to calculate the directional porosity based on the local porosity results in step 3 (set n = 5, type = 'Loose').

The envelope porosities (both bounding box porosity and convex hull porosity) are also calculated.

A MAT data file is exported. Reference: Example_1/Benchmark_Results/Loose_5_Dimensional_porosity.mat.

Step 5:

Run Step5_plot_local_porosity.m to plot the local porosity (set n = 5, type = 'Loose'). Reference resultant figures are shown below.

Local porosity distribution

X slices of local porosity

Y slices of local porosity

Z slices of local porosity

Step 6:

Run Step6_plot_directional_porosity.m to plot directional porosity (set n = 5, type = 'Loose'). Reference resultant figures are shown below.

X directional porosity

Y directional porosity

Z directional porosity

Step 7:

Run Step7_export_voxel_list.m to export the central coordinates of each voxel of ROI. A "*.lmp" data file is exported. Reference: Example_1/Benchmark_Results/vox_list.lmp.

Example 2: ROI of stainless steel

Copy all the MATLAB files (*.m) to a new working directory.

Step 1:

For this example, Raw CT images are provided. One can choose to use FIJI to process raw images and obtain black-white (BW) images. In Example_2/Benchmark_Results/BW_Images, the set of processed BW images are included.

Step 2:

Run Step2_import_bw_slices.m to import image slices from the folder Example_2/BW_images.

A MAT data file is exported. Reference: Example_2/Benchmark_Results/Steel_packing.mat.

Step 3: Run Step3_local_porosity.m to calculate the local porosity using kernel size L_e = 5 voxels (set n = 5, type = 'Steel').

A MAT data file is exported. Reference: Example_2/Benchmark_Results/Steel_porosity_5.mat.

Step 4:

Run Step4_directional_porosity.m to calculate the directional porosity based on the local porosity results in step 3 (set n = 5, type = 'Steel').

The envelop porosities (both bounding box porosity and convex hull porosity) are also calculated.

A MAT data file is exported. Reference: Example_2/Benchmark_Results/Steel_5_Dimensional_porosity.mat.

Step 5:

Run Step5_plot_local_porosity.m to plot the local porosity (set n = 5, type = 'Steel'). Reference resultant figures are shown below.

Local porosity distribution

X slices of local porosity

Y slices of local porosity

Z slices of local porosity

Step 6:

Run Step6_plot_directional_porosity.m to plot directional porosity (set n = 5, type = 'Steel'). Reference resultant figures are shown below.

X directional porosity

Y directional porosity

Z directional porosity

Step 7:

Run Step7_export_voxel_list.m to export the central coordinates of each voxel of ROI. A "*.lmp" data file is exported. Reference: Example_2/Benchmark_Results/vox_list.lmp.

About

This repository contains MATLAB codes and examples that calculate and visualize the three types of porosity for a Region of Interest. Citing article: Sun et al. (2021), X-ray computer tomography-based porosity analysis: Algorithms and application for porous woody biomass. Powder Technology. https://doi.org/10.1016/j.powtec.2021.05.006

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages