Giter Site home page Giter Site logo

qschen / porosity-analysis Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 14.65 MB

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: MIT License

MATLAB 100.00%
porosity x-ray-ct matlab-codes granular-material

porosity-analysis's Introduction

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.

porosity-analysis's People

Contributors

qschen avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.