README.rst 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. freesurfer-stats
  2. ================
  3. TODO add badges
  4. Python Library to Read FreeSurfer's cortical parcellation anatomical statistics
  5. Freesurfer https://surfer.nmr.mgh.harvard.edu/
  6. Install
  7. -------
  8. .. code:: sh
  9. pip3 install --user freesurfer-stats
  10. Releases follow the `semantic versioning <https://semver.org/>` scheme.
  11. Usage
  12. -----
  13. .. code:: python
  14. >>> from freesurfer_stats import CorticalParcellationStats
  15. >>> stats = CorticalParcellationStats.read('tests/subjects/fabian/stats/lh.aparc.DKTatlas.stats')
  16. >>> stats.headers['CreationTime'].isoformat()
  17. '2019-05-09T21:05:54+00:00'
  18. >>> stats.headers['cvs_version']
  19. 'Id: mris_anatomical_stats.c,v 1.79 2016/03/14 15:15:34 greve Exp'
  20. >>> stats.headers['cmdline'][:64]
  21. 'mris_anatomical_stats -th3 -mgz -cortex ../label/lh.cortex.label'
  22. >>> stats.hemisphere
  23. 'left'
  24. >>> stats.general_measurements['Estimated Total Intracranial Volume']
  25. (1670487.274486, 'mm^3')
  26. >>> stats.general_measurements['White Surface Total Area']
  27. (98553.0, 'mm^2')