From 015c5f53b290f943d71750ea7cf6bd0ec9c1c1af Mon Sep 17 00:00:00 2001 From: jpr Date: Wed, 12 Jan 2005 17:10:15 +0000 Subject: [PATCH] FIX : comparison between GDCM_NOTLOADED and Transfer Syntax (related pb not yet solved) --- src/gdcmDocument.cxx | 10 +++++----- src/gdcmValEntry.cxx | 5 ++--- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index c2c6da57..60b3e5a9 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2005/01/12 15:22:23 $ - Version: $Revision: 1.183 $ + Date: $Date: 2005/01/12 17:10:15 $ + Version: $Revision: 1.184 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -2131,7 +2131,7 @@ bool Document::CheckSwap() gdcmVerboseMacro( "Looks like DICOM Version3 (preamble + DCM)" ); // Group 0002 should always be VR, and the first element 0000 - // Let's be carefull (so many wrong hedaers ...) + // Let's be carefull (so many wrong headers ...) // and determine the value representation (VR) : // Let's skip to the first element (0002,0000) and check there if we find // "UL" - or "OB" if the 1st one is (0002,0001) -, @@ -2147,7 +2147,7 @@ bool Document::CheckSwap() entCur = deb + 136; // group 0x0002 *is always* Explicit VR Sometimes , - // even elem 0002,0010 (Transfer Syntax) tells us the file is + // even if elem 0002,0010 (Transfer Syntax) tells us the file is // *Implicit* VR (see former 'gdcmData/icone.dcm') if( memcmp(entCur, "UL", (size_t)2) == 0 || @@ -2377,7 +2377,7 @@ std::string Document::GetTransferSyntaxName() // use the TS (TS : Transfer Syntax) std::string transferSyntax = GetEntry(0x0002,0x0010); - if ( transferSyntax == GDCM_NOTLOADED ) + if ( (transferSyntax.find(GDCM_NOTLOADED) < transferSyntax.length()) ) { gdcmErrorMacro( "Transfer Syntax not loaded. " << std::endl << "Better you increase MAX_SIZE_LOAD_ELEMENT_VALUE" ); diff --git a/src/gdcmValEntry.cxx b/src/gdcmValEntry.cxx index 7b2543a7..0ffc8091 100644 --- a/src/gdcmValEntry.cxx +++ b/src/gdcmValEntry.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmValEntry.cxx,v $ Language: C++ - Date: $Date: 2005/01/07 22:19:48 $ - Version: $Revision: 1.44 $ + Date: $Date: 2005/01/12 17:10:15 $ + Version: $Revision: 1.45 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -92,7 +92,6 @@ void ValEntry::Print(std::ostream &os) v = GetValue(); // not applicable for SQ ... d2 = Util::CreateCleanString(v); // replace non printable characters by '.' if( (GetLength()<=MAX_SIZE_PRINT_ELEMENT_VALUE) || - //(PrintLevel>=3) || (d2.find("gdcm::NotLoaded.") < d2.length()) ) (PrintLevel>=3) || (d2.find(GDCM_NOTLOADED) < d2.length()) ) { s << " [" << d2 << "]"; -- 2.46.1