fix setting xform_code
@@ -198,8 +198,8 @@ def _gen_reference(fixed_image, moving_image, out_file=None, message=None,
xform_code = force_xform_code
# Keep 0, 2, 3, 4 unchanged
- resampled.header.set_qform(xform, xform_code)
- resampled.header.set_sform(xform, xform_code)
+ resampled.header.set_qform(xform, int(xform_code))
+ resampled.header.set_sform(xform, int(xform_code))
resampled.header['descrip'] = 'reference image generated by %s.' % (
message or '(unknown software)')
resampled.to_filename(out_file)
