From: Simon Rit <simon.rit@creatis.insa-lyon.fr>
Date: Fri, 16 Sep 2011 16:29:36 +0000 (+0200)
Subject: Files were not opened in binary mode which caused problems with vox files under windows
X-Git-Tag: v1.3.0~215^2~4
X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cfdbc14b4bab30ca503d590006f5ba1bfc85f372;p=clitk.git

Files were not opened in binary mode which caused problems with vox files under windows
---

diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx
index 785b0fd..10f608e 100644
--- a/common/clitkCommon.cxx
+++ b/common/clitkCommon.cxx
@@ -243,7 +243,7 @@ double clitk::ComputeEuclideanDistanceFromPointToPlane(const itk::ContinuousInde
 // Open a file for reading
 void clitk::openFileForReading(std::ifstream & is, const std::string & filename)
 {
-  is.open(filename.c_str(), std::ios::in);
+  is.open(filename.c_str(), std::ios::in | std::ios::binary);
   if ( is.fail() ) {
     clitkExceptionMacro("Could not open file for reading: " 
                         << filename << ". Error is : <"