The pore network extraction code, based on the maximal ball algorithm developed by Dong and Blunt (2009), serves as the foundation for the generalized network extraction code by Raeini, Bijeljic and Blunt (2017), which is available on GitHub:
https://github.com/ImperialCollegeLondon/pnextract
You can also use the standalone Windows-based software developed here to perform network extraction effortlessly. This software is built upon the pnextract code.
Please contact Sajjad Foroughi at s.foroughi@imperial.ac.uk if you have any inquiries regarding this code.