-
-
Notifications
You must be signed in to change notification settings - Fork 706
Open
Labels
type:BugInconsistencies or issues which will cause an incorrect result under some or all circumstancesInconsistencies or issues which will cause an incorrect result under some or all circumstances
Description
Description
Writing images at NRRD files outputs the wrong type to the NRRD header.
Steps to Reproduce
import SimpleITK as sitk
image = ... # Create sitk image
print(img.GetPixelIDTypeAsString()) # '16-bit signed integer'
sitk.WriteImage(image, "test.nrrd")
Expected behavior
NRRD0004
...
type: int16
Actual behavior
NRRD0004
...
type: short
Reproducibility
This happens 100% of the time for int16 data type, but likely happens with other data types as well.
Versions
I am using the latest Python SimpleITK wrapper.
Environment
Python 3.13 on RHEL 9.5
Additional Information
I use sed -e '/./!Q' /path/to/nrrd/file.nrrd
to read the NRRD header easily.
Metadata
Metadata
Assignees
Labels
type:BugInconsistencies or issues which will cause an incorrect result under some or all circumstancesInconsistencies or issues which will cause an incorrect result under some or all circumstances