Python script & library to read hippocampal subfield volumescomputed by Freesurfer & ASHS
Project description
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.
Source Distribution
freesurfer-volume-reader-2.1.1.tar.gz
(303.8 kB
view hashes)
Built Distribution
Close
Hashes for freesurfer-volume-reader-2.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8220543e7771011c7ed2da6c3b64b59fa4235978d723091741236679f9a53e9a |
|
MD5 | 4f5bde923d3e44e00b599b653e90c7bd |
|
BLAKE2b-256 | af0068a945ad46ddc836fce1d887e3beae1f5e865dde426a21f790f39482c108 |
Close
Hashes for freesurfer_volume_reader-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1fd87f919346aa3dab72244cd0a7ab55f6253aaa49785c8096f0cafd789f9e7 |
|
MD5 | 0726bfcbbda66244139d901bbc06f08e |
|
BLAKE2b-256 | ae83e7abdf2df3cfe870d6c2cb0324b394402b44f0f084db6e77742b2cadbf04 |