Skip to content

Notebook for calculating the Minkowski functionals for a segmented pore scale image

Notifications You must be signed in to change notification settings

cspurin/quantification_porescale_images

Repository files navigation

Quantification of segmented pore-scale images

This notebook takes a segmennted pore-scale image and calculates the 4 Minkowski functionals:

  1. Volume
  2. Surface area
  3. Mean Curvature
  4. Total integral curvature/ Euler characteristic

The Minkowski functionals are described in detail in this manuscript: https://doi.org/10.1016/j.softx.2021.100823

There is also an example for calculating the maximum inscribed sphere in 2D.

Recommended steps for running the notebook.

  1. Download and install vscode: https://code.visualstudio.com/

  2. Download and install python: https://www.python.org/downloads/ (download version 3.10.11)

  3. Install the python extension in vscode. In vscode, click the extensions icon in the sidebar and search for "python"

  4. Open a new folder (link it the folder containing the contents of this repository, wherever that is on your computer)

  5. Create a virtual enviornment. In vscode click View>Terminal and enter the code below:

    python -m venv myenv

    Then for Mac enter:

    source myenv/bin/activate

    or for Windows:

    myenv\Scripts\activate   
  6. Install the necessary packages by typing this in the terminal:

    pip install -r requirements.txt

    NB. must be in the folder where the requirements.txt file is. Alternatively, you can install the packages individually e.g. pip install numpy.

  7. Now open the notebook and begin!

About

Notebook for calculating the Minkowski functionals for a segmented pore scale image

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published