(Python Analysis tools for TEM images of Soot)
A python codebase to analyze TEM images of soot, which includes new methods associated with this project and a compilation of other pre-existing methods into a single Python package. The original implementation was a port of previous MATLAB code (https://github.com/tsipkens/atems), which was described by Sipkens et al. (2023).
This software is released under a GNU GENERAL PUBLIC LICENSE license (see the corresponding license file for details).
This code was primarily compiled by Timothy A. Sipkens.
This work was supported by Dr. Steven Rogak. Other direct contributors include Hamed Nikookar and Darwin Zhu. Pieces of this code were adapted from various sources and features snippets written by several individuals at UBC, including Ramin Dastanpour, Una Trivanovic, Alberto Baldelli, Yiling Kang, Yeshun (Samuel) Ma, and Steven Rogak, among others.
This program contains very significantly modified versions of the code distributed with Dastanpour et al. (2016). The most recent version of the Dastanpour et al. code prior to this overhaul is available at https://github.com/unatriva/UBC-PCM (which itself presents a minor update from the original). That code forms the basis for some of the methods underlying the manual processing and the PCM method used in this code, as noted in the README above. However, significant optimizations have improved code legibility, performance, and maintainability (e.g., the code no longer uses global variables).
A snapshot of the dm3_lib (https://github.com/nanobore/dm3) for reading in DM3 files is included in this program, and represents a Python adaptation of an original ImageJ plugin by Greg Jefferis.
Also included with this program is an adaptation the MATLAB code of Kook et al. (2015), modified to accommodate the expected inputs and outputs common to the other functions.
This code also contain an adaptation of EDM-SBS method of Bescond et al. (2014). We thank the authors, in particular Jérôme Yon, for their help in understanding their original Scilab code and ImageJ plugin. Modifications to allow the method to work directly on binary images (rather than a custom output from ImageJ) and to integrate the method into the MATLAB environment may present some minor compatibility issues, but allows use of the aggregate segmentation methods given in the agg package.
The carboseg method follows from collaborative work with Max Frei and is associated with Sipkens et al. (2021).
Finally, the progress bar in the function tools.textbar, which is used to indicate progress on some of the primary particle sizing techniques, is a modified version of that written by Samuel Grauer.
On use of this code or the k-means segmentation procedure described above, please cite:
Users of the pair correlation method (PCM), the Euclidean distance mapping-surface based scale (EBD-SBS), and Hough transform (following Kook et al.) codes should acknowledge the corresponding studies under the acknowledgements above. Please also consider citing this repository directly.
When using the CNN method (e.g., carboseg) please cite
and see the CarbonBlackSegmentation repository for information on training.
