As you can see, the information is no longer preserved. I am running on Windows with SimpleITK version 1.2.4 and 2.0.2. Any help towards this would be very helpful, thank you. I am also able to replicate this in ITK version 5.0.2 using Python wrapping. This is replicable across Windows and Linux.
The Nifti file format has a lot of complicated and redundant meta-data information. You can use the Meta-Data Dictionary and Print to inspect all the fields of the input images. There are likely inconsistencies caused by your approach of bulk copying all the meta data.
If you are not able to inspect the Nifti meta data, and determine what specific meta-data fields need to changed for your purpose, perhaps a simpler file format such and MetaIO or Nrrd can be used.
Based on the following MWE I suspect there is a bug in the underlying ITK implementation (copying the metadata dictionary will resolve your issue, but isn’t what is expected). When it isn’t copied the srow_x, srow_y, srow_z values in the written nifti are all zeros:
I’m not sure which commit in ITK fixed the issue. Can you check the SimpleITK “latest” binary which is build against ITK from Jan 28th to see if it contains this issue. I am working on a pack to update SimpleITK super build the rc2.