This notebook takes a segmennted pore-scale image and calculates the 4 Minkowski functionals:
- Volume
- Surface area
- Mean Curvature
- 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.
-
Download and install vscode: https://code.visualstudio.com/
-
Download and install python: https://www.python.org/downloads/ (download version 3.10.11)
-
Install the python extension in vscode. In vscode, click the extensions icon in the sidebar and search for "python"
-
Open a new folder (link it the folder containing the contents of this repository, wherever that is on your computer)
-
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
-
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.
-
Now open the notebook and begin!