X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=common%2FclitkCommon.cxx;h=57be29e5297f833d53769818b0aa097cb3d93a6c;hb=0afc0bed742570bfb6d2b3439d06892214b8a764;hp=785b0fd2c021ad087dd500a68ba0d03a60481b65;hpb=1b6c27b984f38e6a16edb99c78e513d85b53ea00;p=clitk.git diff --git a/common/clitkCommon.cxx b/common/clitkCommon.cxx index 785b0fd..57be29e 100644 --- a/common/clitkCommon.cxx +++ b/common/clitkCommon.cxx @@ -104,6 +104,15 @@ float clitk::PixelTypeDownCast(const double & x) } //------------------------------------------------------------------ +//------------------------------------------------------------------ +// Convert a pixel type without casting +template<> +double clitk::PixelTypeDownCast(const double & x) +{ + return x; +} +//------------------------------------------------------------------ + //------------------------------------------------------------------ double clitk::rad2deg(const double anglerad) { @@ -243,7 +252,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 : <"