Just use pip
pip install vnav
This is a small python script to parse the DICOM files from a vNavs series and convert them into an average RMS motion score. The script takes the following arguments:
--tr
which is the TR of the parent sequence (i.e., the MPRAGE) expressed in seconds (e.g.,--tr 2.4
); and--input
which is the list of files DICOM files that makeup the vNavs series; or--input-dir
which is a directory containing DICOM files that makeup the vNavs series; or--input-json
which is a BIDS JSON sidecar file containing anImageComments
array; and- either
--rms
or--max
which decides whether the time-averaged RMS motion or time-averaged max motion is printed; and --output-dir
which is the desired output directory
This script will output a JSON file containing
Transforms
HomogeneousTransforms
vNavMotionScoresRMS
vNavMotionScoresMax
MeanMotionScoreRMSPerMin
MeanMotionScoreMaxPerMin
Failed
which is ethernull
or an array containing theAquisitionNumber
andInstanceNumber
where vNav failed.