a48261482ed4fa257219095120ab90012da615bb,pynets/registration/reg_utils.py,,match_target_vox_res,#Any#Any#Any#Any#,550
Before Change
img_file_res = "%s%s%s%s" % (out_dir, "/", os.path.basename(img_file).split(".nii.gz")[0],
"_res.nii.gz")
data2, affine2 = reslice(data, affine, zooms, new_zooms)
if abs(np.round(zooms[0],1)) != abs(np.round(zooms[1],1)) != abs(np.round(zooms[2],1)):
raise ValueError("ERROR: isotropic voxel resolutions not supported.")
img2 = nib.Nifti1Image(data2, affine=affine2, header=hdr)
img2 = normalize_xform(img2)
nib.save(img2, img_file_res)
print("Resliced affine: ")
After Change
data2, affine2 = reslice(data, affine, zooms, new_zooms)
// Resize FOV if voxels were non-isotropic
scale_factor = np.array(zooms) / np.array(new_zooms)
affine2[:3, 3] = affine2[:3, 3].dot(np.diag(scale_factor/stats.mode(scale_factor)[0][0]))
img2 = nib.Nifti1Image(data2, affine=affine2)
img2 = normalize_xform(img2)
nib.save(img2, img_file_res)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: dPys/PyNets
Commit Name: a48261482ed4fa257219095120ab90012da615bb
Time: 2019-07-25
Author: dpisner@utexas.edu
File Name: pynets/registration/reg_utils.py
Class Name:
Method Name: match_target_vox_res
Project Name: geomstats/geomstats
Commit Name: d496aaefc795e176b615815e9f30f335860f013b
Time: 2018-01-22
Author: ninamio78@gmail.com
File Name: geomstats/lie_group.py
Class Name: LieGroup
Method Name: group_log
Project Name: geomstats/geomstats
Commit Name: d496aaefc795e176b615815e9f30f335860f013b
Time: 2018-01-22
Author: ninamio78@gmail.com
File Name: geomstats/lie_group.py
Class Name: LieGroup
Method Name: group_exp