Page MenuHomePhabricator

patch-2473.patch

Authored By
maleike
Jan 25 2010, 4:00 PM
Size
2 KB
Referenced Files
None
Subscribers
None

patch-2473.patch

Index: Core/Code/Algorithms/mitkDataTreeNodeFactory.cpp
===================================================================
--- Core/Code/Algorithms/mitkDataTreeNodeFactory.cpp (revision 21099)
+++ Core/Code/Algorithms/mitkDataTreeNodeFactory.cpp (working copy)
@@ -23,12 +23,14 @@
// C-Standard library includes
#include <stdlib.h>
+#include <locale.h>
// STL-related includes
#include <vector>
#include <map>
#include <istream>
#include <cstdlib>
+#include <locale>
// VTK-related includes
@@ -84,7 +86,7 @@
#include "mitkVtkResliceInterpolationProperty.h"
#include "mitkProgressBar.h"
-bool mitk::DataTreeNodeFactory::m_TextureInterpolationActive = true; // default value for texture interpolation if nothing is defined in global options (see QmitkMainTemplate.ui.h)
+bool mitk::DataTreeNodeFactory::m_TextureInterpolationActive = false; // default value for texture interpolation if nothing is defined in global options (see QmitkMainTemplate.ui.h)
mitk::DataTreeNodeFactory::DataTreeNodeFactory()
: m_UseSeriesDetails(true)
@@ -258,6 +260,12 @@
void mitk::DataTreeNodeFactory::ReadFileSeriesTypeDCM()
{
MITK_INFO << "loading image series with prefix " << m_FilePrefix << " and pattern " << m_FilePattern << " as DICOM..." << std::endl;
+
+ char* previousCLocale = setlocale(LC_NUMERIC, NULL);
+ setlocale(LC_NUMERIC, "C");
+ std::locale previousCppLocale( std::cin.getloc() );
+ std::locale l( "C" );
+ std::cin.imbue(l);
typedef itk::Image<short, 3> ImageType;
typedef itk::ImageSeriesReader< ImageType > ReaderType;
@@ -354,6 +362,9 @@
reader->ResetPipeline();
}
}
+
+ setlocale(LC_NUMERIC, previousCLocale);
+ std::cin.imbue(previousCppLocale);
}
Index: Core/Code/Testing/mitkDICOMLocaleTest.cpp
===================================================================
--- Core/Code/Testing/mitkDICOMLocaleTest.cpp (revision 21102)
+++ Core/Code/Testing/mitkDICOMLocaleTest.cpp (working copy)
@@ -91,8 +91,8 @@
mitkDICOMLocaleTestChangeLocale("C");
mitkDICOMLocaleTestWithReferenceImage();
// load a reference DICOM file with the German "de_DE.utf8" locale being set
- //mitkDICOMLocaleTestChangeLocale("de_DE.utf8");
- //mitkDICOMLocaleTestWithReferenceImage();
+ mitkDICOMLocaleTestChangeLocale("de_DE.utf8");
+ mitkDICOMLocaleTestWithReferenceImage();
MITK_TEST_END();
}

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
303
Default Alt Text
patch-2473.patch (2 KB)

Event Timeline