[Insight-users] Going from 3D Image to 4DImage: How to deal with Directions/Spacing
Kent Williams
nkwmailinglists at gmail.com
Tue Aug 7 16:53:30 EDT 2012
I am running into this with DWI Datasets, which are a series of 3D
volumes, but as it happens, they're packed in a 3D image.
I want to write out a 4D NRRD file.
Just packing in the pixels is no problem -- it's sufficient to just
memcpy from the 3D image buffer to the 4D image buffer.
But Direction Cosines are trickier -- do I just do something like this?
3D:
Dir1.0 Dir2.0 Dir3.0
Dir1.1 Dir2.1 Dir3.0
Dir1.2 Dir2.2 Dir3.2
4D:
Dir1.0 Dir2.0 Dir3.0 0
Dir1.1 Dir2.1 Dir3.0 0
Dir1.2 Dir2.2 Dir3.2 0
0 0 0 1
And spacing is probably OK like this
3D: [ X Y Z ] to 4D: [X Y Z 1]
More information about the Insight-users
mailing list