暂无描述

Fabian Peter Hammerle 0d6cacdd34 Revert "configure pytest to always create coverage report" 5 年之前
examples 1abafc1ed8 test `python -m` module call to increase coverage 5 年之前
freesurfer_volume_reader 898d71570b extend docstring sample: chain Freesurfer & ASHS find() iterator 5 年之前
tests a581e5aad7 test abstract VolumeFile.* to increase coverage 5 年之前
.gitignore 43f43f806c git ignore coverage data 5 年之前
.pylintrc 0ca4226d54 added ashs.HippocampalSubfieldsVolumeFile.read_volumes_mm3() 5 年之前
.travis.yml 0d6cacdd34 Revert "configure pytest to always create coverage report" 5 年之前
Pipfile b667c9bd79 travis-ci: configure pytest to create coverage report 5 年之前
Pipfile.lock b667c9bd79 travis-ci: configure pytest to create coverage report 5 年之前
README.md 5f546743fc added ashs.HippocampalSubfieldsVolumeFile.read_volumes_dataframe() 5 年之前
setup.py 3af0d701e7 setup.py: added missing pytest-cov dependency 5 年之前

README.md

freesurfer-volume-reader

Build Status

Python script & library to read hippocampal subfield volumes computed by Freesurfer

https://surfer.nmr.mgh.harvard.edu/fswiki/HippocampalSubfields

Install

pip3 install --user freesurfer-volume-reader
freesurfer-volume-reader --help

Usage

export SUBJECTS_DIR=/my/freesurfer/subjects
freesurfer-volume-reader

or

freesurfer-volume-reader /my/freesurfer/subjects
freesurfer-volume-reader /my/freesurfer/subjects /other/freesurfer/subjects

or

from freesurfer_volume_reader import freesurfer

for volume_file in freesurfer.HippocampalSubfieldsVolumeFile.find('/my/freesurfer/subjects'):
    print(volume_file.subject, volume_file.hemisphere, volume_file.analysis_id)
    print(volume_file.read_volumes_mm3())
    print(volume_file.read_volumes_dataframe())

ASHS

from freesurfer_volume_reader import ashs

for volume_file in ashs.HippocampalSubfieldsVolumeFile.find('/my/ashs/subjects'):
    print(volume_file.subject, volume_file.hemisphere, volume_file.correction)
    print(volume_file.read_volumes_mm3())
    print(volume_file.read_volumes_dataframe())

Tests

pip3 install --user pipenv
git clone https://github.com/fphammerle/freesurfer-volume-reader.git
cd freesurfer-volume-reader
pipenv run pylint freesurfer_volume_reader
pipenv run pytest