From: jpr Date: Mon, 28 Nov 2005 16:29:13 +0000 (+0000) Subject: Track troubles on Big endian processors X-Git-Tag: Version1.3~25 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=82afaad85d04083d5d7945e2a70a79a720a9ba3a;p=gdcm.git Track troubles on Big endian processors --- diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index 51149b60..fdd84ee3 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestAllReadCompareDicom.cxx,v $ Language: C++ - Date: $Date: 2005/11/28 13:33:38 $ - Version: $Revision: 1.57 $ + Date: $Date: 2005/11/28 16:29:13 $ + Version: $Revision: 1.58 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -282,15 +282,17 @@ bool TestFile::ReadFileData(std::ifstream *fp) if( !Data ) return(false); - // Read data + // Read data Note : .tst images are *always* created + // on little endian processor ! fp->read((char *)Data,GetDataSize()); // Track BigEndian troubles std::cout << " ScalarSize : " << GetScalarSize() - << " SwapCode:" << GetSwapCode() + << " IsCurrentProcessorBigEndian:" + << gdcm::Util::IsCurrentProcessorBigEndian() << std::endl; - //if (GetScalarSize() == 1 || GetSwapCode() == 1234) + //if (GetScalarSize() == 1 || GetSwapCode() == 1234) if (GetScalarSize() == 1 || !gdcm::Util::IsCurrentProcessorBigEndian() ) { return true;