891e580bc8e66d0d81c2334c507cd1b10f93cbc2,pynets/utils.py,,reorient_img,#Any#Any#,989
Before Change
cmd = "fslswapdim " + img + " -x -y z " + img_PA
os.system(cmd)
cmd = "fslorient -getqform " + img_PA
qform = os.popen(cmd).read().strip("\n")
img = img_PA
reoriented = True
// Inferior-Superior Reorientation
if float(qform.split(" ")[:-1][10]) <= 0:
After Change
os.system(cmd)
cmd = "fslorient -getqform " + img_PA
cmd_run = os.popen(cmd)
qform = cmd_run.read().strip("\n")
cmd_run.close()
img = img_PA
// Inferior-Superior Reorientation
if float(qform.split(" ")[:-1][10]) <= 0:
img_IS = "{}/img_reor_IS.nii.gz".format(out_dir)
print("Reorienting I-S flip (img)...")
cmd = "fslswapdim " + img + " -x y -z " + img_IS
os.system(cmd)
img = img_IS
cmd = "fslorient -forceradiological " + img
os.system(cmd)
else:
print("Radiological (img)...")
// Posterior-Anterior Reorientation
if float(qform.split(" ")[:-1][5]) <= 0:
img_PA = "{}/img_reor_PA.nii.gz".format(out_dir)
print("Reorienting P-A flip (img)...")
cmd = "fslswapdim " + img + " -x -y z " + img_PA
os.system(cmd)
cmd = "fslorient -getqform " + img_PA
cmd_run = os.popen(cmd)
qform = cmd_run.read().strip("\n")
cmd_run.close()
img = img_PA
reoriented = True
// Inferior-Superior Reorientation
if float(qform.split(" ")[:-1][10]) <= 0:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dPys/PyNets
Commit Name: 891e580bc8e66d0d81c2334c507cd1b10f93cbc2
Time: 2019-06-09
Author: dpisner@utexas.edu
File Name: pynets/utils.py
Class Name:
Method Name: reorient_img
Project Name: dPys/PyNets
Commit Name: 891e580bc8e66d0d81c2334c507cd1b10f93cbc2
Time: 2019-06-09
Author: dpisner@utexas.edu
File Name: pynets/utils.py
Class Name:
Method Name: reorient_dwi
Project Name: PyMVPA/PyMVPA
Commit Name: 96353ee672e68c88bf940582cb832f7ffb3e6a3d
Time: 2011-01-11
Author: michael.hanke@gmail.com
File Name: mvpa/__init__.py
Class Name:
Method Name: