diff --git a/flipGradVectors.py b/flipGradVectors.py index 190f622..828c375 100755 --- a/flipGradVectors.py +++ b/flipGradVectors.py @@ -22,6 +22,7 @@ def flip_file(infile, outfile, axis='1', dryrun=False): if infile.endswith('.nrrd') or infile.endswith('.nhdr'): header, data = nrrd.NrrdReader().load(infile) dvecs = header._data['DWMRI_gradient'] + dvecs = np.asarray(dvecs) else: dvecs = np.loadtxt(infile) diff --git a/motion_correction/motion_correction.sh b/motion_correction/motion_correction.sh index 1a83139..ec1bb90 100755 --- a/motion_correction/motion_correction.sh +++ b/motion_correction/motion_correction.sh @@ -1,4 +1,4 @@ -#!/bin/bash -l +#!/bin/bash -l # Script to perform general inter-slice motion correction # Written: David Rotenberg # Modified: David Qixiang Chen @@ -7,12 +7,12 @@ usage() { cat< tmp.nhdr -cat newdirs.nhdr >> tmp.nhdr -mv tmp.nhdr $dwi_out +cat $dwi_out | head -25 > tmp.nhdr +cat tmp.nhdr | egrep -v '^*#' > tmp2.nhdr +cat tmp2.nhdr | head -17 > tmp3.nhdr + +#cat $dwi_out | head -19 > tmp.nhdr +cat newdirs.nhdr >> tmp3.nhdr +cat tmp3.nhdr > $dwi_out +rm tmp*.nhdr diff --git a/slicerDWIConvert.sh b/slicerDWIConvert.sh old mode 100644 new mode 100755