bbf4350363dc25cb9cdabb9d8fb635e96a617f32,niftynet/io/misc_io.py,,rectify_header_sform_qform,#Any#,96
Before Change
img_nii.set_qform(np.copy(img_nii.get_sform()))
return img_nii
affine = img_nii.affine
pixdim = img_nii.header.get_zooms()[:3] // TODO: assuming 3 elements
new_affine = create_affine_pixdim(affine, pixdim)
img_nii.set_sform(new_affine)
img_nii.set_qform(new_affine)
After Change
img_nii.set_qform(np.copy(img_nii.get_sform()))
return img_nii
affine = img_nii.affine
pixdim = img_nii.header.get_zooms()
while len(pixdim) < 3:
pixdim = pixdim + (1.0,)
// TODO: assuming 3 elements
new_affine = create_affine_pixdim(affine, pixdim[:3])
img_nii.set_sform(new_affine)
img_nii.set_qform(new_affine)
return img_nii
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: NifTK/NiftyNet
Commit Name: bbf4350363dc25cb9cdabb9d8fb635e96a617f32
Time: 2017-08-28
Author: wenqi.li@ucl.ac.uk
File Name: niftynet/io/misc_io.py
Class Name:
Method Name: rectify_header_sform_qform
Project Name: loli/medpy
Commit Name: 98fcbb8769a94fb8d62297b33bec0b669febf7bc
Time: 2013-05-27
Author: oskar.maier@googlemail.com
File Name: medpy/io/header.py
Class Name:
Method Name: __get_pixel_spacing_nibabel
Project Name: NifTK/NiftyNet
Commit Name: ecdc09ec1c6aaccb766d80dabdbc6b015cd5d183
Time: 2017-06-23
Author: wenqi.li@ucl.ac.uk
File Name: utilities/misc_io.py
Class Name:
Method Name: rectify_header_sform_qform