What's Changed
- Introduces Pydantic Dataclasses for the different levels of data analysed and passed around between processing,
TopoStats,GrainCrops,DisorderedTrace,Node,OrderedTrace,MatchedBranch,UnmatchedBranch, giving strong typing of attributes to facilitate cleaner development going forward. - Revises and updates the
.topostatsHDF5 format to reflect the internal structure introduced by the above dataclasses. These are compressed format HDF5 and can easily be read by AFMReader which returns a dictionary representation. TopoStats contains functions to take these dictionaries and recreate theTopoStatsobjects with the same nested structure of attributes they were created from. - All tests have been updated to reflect the new Dataclasses
- Switches to using Syrupy for regression tests rather than pytest-regtest
- Adds advanced documentation on the classes structure and notes on extending TopoStats.
- Revised some of the internal nomenclature to make it clearer what the required parameters are at different stages (mainly distinguishing between the different forms of skeletons required at different stages).
- Removes
ImageGrainCropandGrainCropsDirectionclasses. Instead the threshold and "direction" of a grain is stored as an attribute of theGrainCropclass. - Filenames used in logging and for the creation of per-image output now include the file extension. This is so that older Bruker files which have the same stem (the part before the file extension) do not have data over-written. As a consequence the
.topostatsfiles that are written at the end of processing now reside under<output_dir>/processed/topostats/*.topostatsas having a file and directory of the same name in the same location isn't possible.
New Contributions
This release see's new contributions from...
Thank you 🙏
Full Changelog: v2.3.2...v2.4.0