Back to Projects List
Whitematteranalysis To Python3
- Scott Lill (Univestiy of Sydney, Harvard Medical School)
- Steve Pieper (Harvard Medical School)
- Sandy Wells (Harvard Medical School)
- Yang Song (University of New South Wales)
- Tom Cai (University of Sydney)
- Fan Zhang (Harvard Medical School)
- Lauren O’Donnell (Harvard Medical School)
Whitematteranalysis is a python pipeline for performing fiber processing and clustering. The project aims to upgrade this package, porting it to python3, adding a comprehensive suite of regression tests and porting it into 3D Slicer. This will make the pipeline easier to use, maintain and extend, all of which are beneficial for applicable dMRI workflows.
- Objective A. Port the codebase to python3, adding regression tests to ensure consistency.
- Objective B. Bundle the pipeline into 3D Slicer, adding a qt based GUI as an alternative to the CLI interface
- Objective C. Add regression tests for existing and added functionality.
Approach and Plan
- Test and iterate the python version conversion
- Explore options for running python externally to 3D slicer to allow the porting of required dependancies.
- Document functionality to ensure coverage for the testing suite
- Transited codebase into python3 syntactically with automated upgrading
- Manual review of codebase to fix error in the automatic review
Sanity testing of entire pipeline - running through with both python 2 and 3 for consistency within a certain tolerance, due to stochastic functionality.
- Fixing errors caused by library changes, revealed by sanity testing.
- Testing with controlled stochasticity via a python testing environment. Changes also applied to python2, to allow comparisons.
- Ensuring portability in serialisation format. Settled on providing backwards compatibility of files serialised under python2 by making the python3 code able to read python2 or python3 objects, but only support writing python3. This will shift serialised objects towards python3 standards and facilitate eventually dropping python2 support.
- Wrote a script for bundling whitematteranalysis (WMA) in its own python environment, seperate from the system python or Slicer python. This is necessary for porting WMA to Slicer, as it uses dependancies unsupported by Slicer’s python and the system python not under the control of Slicer and therefore unreliable. The next step of writing a GUI extension in Slicer was not completed.
Github links of the updated repos:
- Python3 branch: https://github.com/ScLill/whitematteranalysis/tree/2to3
- Testing branch：https://github.com/ScLill/whitematteranalysis/tree/2test
Clustering done under python3
Integrate into the master branch of the WMA repo.
Background and References
Documentation for original project - https://github.com/SlicerDMRI/whitematteranalysis/blob/master/doc/subject-specific-tractography-parcellation.md