Skip to content

Commit a02aef4

Browse files
committed
BF: old Pydicom uses Decimal strings
Cast values to float before setting into nifti header.
1 parent be9b778 commit a02aef4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

nibabel/dft.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ def as_nifti(self):
192192
(pdi * cosi[2], pdj * cosj[2], pdk * cosk[2], pos_1[2]),
193193
(0, 0, 0, 1))
194194

195-
m = numpy.array(m)
195+
# Values are python Decimals in pydicom 0.9.7
196+
m = numpy.array(m, dtype=float)
196197

197198
hdr = Nifti1Header(endianness='<')
198199
hdr.set_intent(0)

0 commit comments

Comments
 (0)