暫無描述

Fabian Peter Hammerle 2361cd5d6b fix bad-continuation 5 年之前
examples 91700cff1e examples/ashs.ipynb: added ashs.IntracranialVolumeFile 5 年之前
freesurfer_volume_reader fd1d0d73e8 refactor: use new SubfieldVolumeFile._read_volume_series() 5 年之前
tests 2361cd5d6b fix bad-continuation 5 年之前
.coveragerc 6b2c883982 coverage: enable branch management 5 年之前
.gitignore a2fb595e9f gitignore tags 5 年之前
.pylintrc 0ca4226d54 added ashs.HippocampalSubfieldsVolumeFile.read_volumes_mm3() 5 年之前
.travis.yml 6d0b5d6766 travis-ci: send coverage report to coveralls 5 年之前
Pipfile 863bbde9ed set upper version constraint for dependencies to prevent unexpected breaking changes 5 年之前
Pipfile.lock 863bbde9ed set upper version constraint for dependencies to prevent unexpected breaking changes 5 年之前
README.md d1b18ef89b readme: added ashs.IntracranialVolumeFile 5 年之前
setup.py 4b7481f697 version.py: rename version string variable `version` -> `__version__` to fix pylint C0103 5 年之前

README.md

freesurfer-volume-reader

Build Status Coverage Status Latest PyPI Version Python Versions

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

Install

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

Releases follow the semantic versioning scheme.

Usage

Freesurfer

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

export SUBJECTS_DIR=/my/ashs/subjects
freesurfer-volume-reader --source-types ashs

or

freesurfer-volume-reader --source-types ashs -- /my/ashs/subjects
freesurfer-volume-reader --source-types ashs -- /my/ashs/subjects /other/ashs/subjects

or

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())

Intracranial Volume

from freesurfer_volume_reader import ashs

for volume_file in ashs.IntracranialVolumeFile.find('/my/ashs/subjects'):
    print(volume_file.subject)
    print(volume_file.read_volume_mm3())
    print(volume_file.read_volume_series())

Freesurfer & ASHS

freesurfer-volume-reader --source-types ashs freesurfer-hipposf -- /my/subjects
freesurfer-volume-reader --source-types ashs freesurfer-hipposf -- /my/ashs/subjects /my/freesurfer/subjects /other/subjects

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