Skip to content

Commit

Permalink
Fix int dtype in Image.
Browse files Browse the repository at this point in the history
  • Loading branch information
wtclarke committed Jan 11, 2023
1 parent d57fa28 commit 2d6f8c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec2nii/spec2nii.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,11 +405,12 @@ def dicom(self, args):
from nibabel import save
for img, f_out in zip(self.imageOut, self.fileoutNames):
out = self.outputDir / (f_out + '_voi.nii.gz')
mask_data = np.ones((1, 1, 1), int)
save(
Nifti2Image(
np.ones((1, 1, 1), int),
mask_data,
img.hdr_ext['VOI'],
dtype=int),
dtype=mask_data.dtype),
out)

# Siemens RDA (.rda) format
Expand Down

0 comments on commit 2d6f8c4

Please sign in to comment.