Skip to content

Instantly share code, notes, and snippets.

@stowler
Created September 30, 2013 21:14
Show Gist options
  • Save stowler/6770381 to your computer and use it in GitHub Desktop.
Save stowler/6770381 to your computer and use it in GitHub Desktop.
terminal output from Stella's intro to fmri QC
stowler@pano:/data/birc/Atlanta/PIT/05.Scripts$ bash test_stephen.sh
For each FMRI series:
1) counting the number of DICOMs
2) converting the series into a 4D nifti file:
############### DICOMs from series fMRI_1_6 : ###############
LOCATION : /data/birc/Atlanta/PIT/origUnzipped/PIT_05_20110803/fMRI_1_6
FILE COUNT: 257
If that's the expected DICOM count for the series, hit
Enter to continue. (or CTRL-C to quit)
Creating .bxh metafile for series fMRI_1_6...
DcmItem: Length of attribute (230a,4420) is odd
DcmElement: Unknown Tag & Data(230a,4420) larger (1836016489) that remaining bytes in file
Error reading file '/data/birc/Atlanta/PIT/origUnzipped/PIT_05_20110803/fMRI_1_6/00001.dcm.nfo' (may not be DICOM); skipping.
Note: detected wrap-around in slice origins -- assuming 1 images per timepoint.
Added extra dimension: dimnum=4 dimname=t dimsize=256
...done.
Creating nifti volume for series fMRI_1_6...
...done.
Reorienting series fMRI_1_6 nifti volume to match FSL's MNI 152 template...
...done.
############### DICOMs from series fMRI_2_7 : ###############
LOCATION : /data/birc/Atlanta/PIT/origUnzipped/PIT_05_20110803/fMRI_2_7
FILE COUNT: 257
If that's the expected DICOM count for the series, hit
Enter to continue. (or CTRL-C to quit)
Creating .bxh metafile for series fMRI_2_7...
DcmItem: Length of attribute (230a,4420) is odd
DcmElement: Unknown Tag & Data(230a,4420) larger (1836016489) that remaining bytes in file
Error reading file '/data/birc/Atlanta/PIT/origUnzipped/PIT_05_20110803/fMRI_2_7/00001.dcm.nfo' (may not be DICOM); skipping.
Note: detected wrap-around in slice origins -- assuming 1 images per timepoint.
Added extra dimension: dimnum=4 dimname=t dimsize=256
...done.
Creating nifti volume for series fMRI_2_7...
...done.
Reorienting series fMRI_2_7 nifti volume to match FSL's MNI 152 template...
...done.
total 266592
-rw-r--r-- 1 stowler centrify 57737 Sep 30 16:53 fmriSeriesfMRI_1_6.bxh
-rw-r--r-- 1 stowler centrify 58796685 Sep 30 16:53 fmriSeriesfMRI_1_6_MNI.nii.gz
-rw-r--r-- 1 stowler centrify 77594976 Sep 30 16:53 fmriSeriesfMRI_1_6.nii
-rw-r--r-- 1 stowler centrify 57738 Sep 30 16:57 fmriSeriesfMRI_2_7.bxh
-rw-r--r-- 1 stowler centrify 58871134 Sep 30 16:58 fmriSeriesfMRI_2_7_MNI.nii.gz
-rw-r--r-- 1 stowler centrify 77594976 Sep 30 16:57 fmriSeriesfMRI_2_7.nii
Now opening fslview to confirm that each reoriented _MNI volume has
orientation consistent with the MNI152 template...
If you are happy with what you seen in fslview, hit
Enter to continue. (or CTRL-C to quit)
Creating QC report for series fMRI_1_6 fMRI_2_7:
convert: unable to read font `/usr/share/fonts/default/Type1/n019003l.pfb'.
convert: unable to read font `/usr/share/fonts/default/Type1/n019003l.pfb'.
Done! Output is in /tmp/qcPIT-PIT005-1scr-FmriFingerTapping/qcReport-FBIRN/index.html
...done.
To inspect the QC report just point your web browser at file:///tmp/qcPIT-PIT005-1scr-FmriFingerTapping/qcReport-FBIRN/index.html
If you are happy with the conversion and QC results, copy the output files
from the temporary /tmp/qcPIT-PIT005-1scr-FmriFingerTapping to your project folder.
Something like:
mkdir -p /data/birc/Atlanta/PIT/06.acqfiles/PIT005/1scr/FmriFingerTapping
mkdir -p /data/birc/Atlanta/PIT/08.QC/PIT005/1scr/FmriFingerTapping
cp /tmp/qcPIT-PIT005-1scr-FmriFingerTapping/*.nii* /data/birc/Atlanta/PIT/06.acqfiles/PIT005/1scr/FmriFingerTapping
cp /tmp/qcPIT-PIT005-1scr-FmriFingerTapping/*.bxh /data/birc/Atlanta/PIT/06.acqfiles/PIT005/1scr/FmriFingerTapping
cp -r /tmp/qcPIT-PIT005-1scr-FmriFingerTapping/qcReport-FBIRN /data/birc/Atlanta/PIT/08.QC/PIT005/1scr/FmriFingerTapping
...then the last step is for you to delete your temporary directory /tmp/qcPIT-PIT005-1scr-FmriFingerTapping .
268M /tmp/qcPIT-PIT005-1scr-FmriFingerTapping
stowler@pano:/data/birc/Atlanta/PIT/05.Scripts$ dfgasdgfasdgf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment