Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python script & library to read hippocampal subfield volumescomputed by Freesurfer & ASHS

Project description

https://travis-ci.org/fphammerle/freesurfer-volume-reader.svg?branch=master https://coveralls.io/repos/github/fphammerle/freesurfer-volume-reader/badge.svg?branch=master https://img.shields.io/pypi/v/freesurfer-volume-reader.svg https://img.shields.io/pypi/pyversions/freesurfer-volume-reader.svg

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for freesurfer-volume-reader, version 2.0.0
Filename, size File type Python version Upload date Hashes
Filename, size freesurfer_volume_reader-2.0.0-py3-none-any.whl (7.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size freesurfer-volume-reader-2.0.0.tar.gz (289.4 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page