Summary of problem description
actual behaviour
While testing import of DICOM images, I found that one computer with Ubuntu 9.04 64bit read certain DICOM files upside-down and without spacing information. (A couple of other computers with identical OS did not have this problem)
After checking all kind of differences in ITK build options, I found that one difference between the systems was the locale. The computer with the error had a German locale, while all others were set to US English.
Changing the users's locale to US proved to be a workaround for the problem.
expected behaviour
DICOM files should be read correctly with all possible user locales.
Cause of the bug
something inside GDCM uses a locale dependent C/C++ string-to-number conversion and does not care to set a defined locale.
Proposed solution
In DataTreeNodeFactory, while reading a DICOM series: - remeber current locale as "previous locale" - set locale for C and std::cin to "C" - read DICOM using GDCM - reset locale for C and std::cin to "previous locale"
Affected classes
mitkDataTreeNodeFactory.cpp
How will the bugfix get tested?
A new unit test mitkDICOMLocaleTest has been created to reproduce the problem and to verify the fix.
