File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -353,14 +353,14 @@ If you create a new image and specify an existing header, e.g.:
353353>>> new_data = np.random.random(n1_img.shape[:3 ])
354354>>> new_img = nib.nifti1.Nifti1Image(data, None , header = new_header)
355355
356- Then the newly created image will inherit the same sform and qform codes that
356+ then the newly created image will inherit the same sform and qform codes that
357357are in the provided header. However, if you create a new image with both an
358358affine and a header specified, e.g.:
359359
360360>>> xform = np.eye(4 )
361361>>> new_img = nib.nifti1.Nifti1Image(data, xform, header = new_header)
362362
363- Then the sform and qform codes will *only * be preserved if the provided affine
363+ then the sform and qform codes will *only * be preserved if the provided affine
364364is the same as the affine in the provided header. If the affines do not match,
365365the sform and qform codes will be set to their default values of 2 and 0
366366respectively. This is done on the basis that, if you are changing the affine,
You can’t perform that action at this time.
0 commit comments