[Insight-users] Saving Image Orientation Bug?

Constantine Zakkaroff mnkz at leeds.ac.uk
Wed Oct 28 09:22:54 EDT 2009


Yello ALL,

The was a mention of this a couple of months back, but it seems 3.16 
still has this issue unresolved.

It appears that direction matrix gets transposed during writing dicom 
images, unless metadata dictionary array is passed to the writer.

For example, in Examples/IO/DicomSeriesReadImageWrite2.cxx, we read some 
series with this orientation:

(0020,0037)	Image Orientation (Patient)                     	VR: DS 
Length: 88	 Value: 
0.41069489717483\0.83055555820465\-0.3761743903160\-0.6754358410835\0.0\-0.7374187111854

Saved volume displays this orientation:

(0020,0037)	Image Orientation (Patient)                     	VR: DS 
Length: 56	 Value: 0.410695\-0.675436\-0.612467\0.830556\0.000000\0.556936

Basically the first two rows of the orientation matrix get written to 
dicom header, instead of the first two columns.

However in another example, DicomSeriesReadSeriesWrite.cxx, before 
writing the whole metadata dictionary array is passed to the writer and 
the orientation in the output series comes out right:

(0020,0037)	Image Orientation (Patient)                     	VR: DS 
Length: 88	 Value: 
0.41069489717483\0.83055555820465\-0.3761743903160\-0.6754358410835\0.0\-0.7374187111854

Is it intended to be this way, saving transposed orientation matrix 
unless metadata dictionary array is passed to the writer? Is it a 
feature or is it a bug?

Regards,
Constantine


More information about the Insight-users mailing list