X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=src%2FgdcmDocument.cxx;h=c339fa44ff53f8a59dbe98c6d4cdd58a91b9a175;hb=74586e21f1934a3b0250f3230f6369a7df5445a5;hp=8ac4b2296ae0d43209ef487b7bfed0319bf1e90c;hpb=880f6dfe2e061712fafbf75ab9547aadf170fc40;p=gdcm.git diff --git a/src/gdcmDocument.cxx b/src/gdcmDocument.cxx index 8ac4b229..c339fa44 100644 --- a/src/gdcmDocument.cxx +++ b/src/gdcmDocument.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: gdcmDocument.cxx,v $ Language: C++ - Date: $Date: 2006/05/05 22:13:55 $ - Version: $Revision: 1.347 $ + Date: $Date: 2006/05/30 08:10:19 $ + Version: $Revision: 1.349 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -95,19 +95,22 @@ bool Document::Load( ) return DoTheLoadingDocumentJob( ); } -#ifndef GDCM_LEGACY_REMOVE + +//#ifndef GDCM_LEGACY_REMOVE /** * \brief Loader. (DEPRECATED : not to break the API) * @param fileName 'Document' (File or DicomDir) to be open for parsing * @return false if file cannot be open or no swap info was found, * or no tag was found. */ + /* bool Document::Load( std::string const &fileName ) { Filename = fileName; return DoTheLoadingDocumentJob( ); } -#endif +*/ +//#endif /** * \brief Performs the Loading Job (internal use only) @@ -260,7 +263,7 @@ bool Document::DoTheLoadingDocumentJob( ) LoadDocEntry(d, true); } - CloseFile(); + CloseFile(); // ---------------------------- // Specific code to allow gdcm to read ACR-LibIDO formated images @@ -1046,7 +1049,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, DocEntry *newDocEntry; DataEntry *newDataEntry; SeqEntry *newSeqEntry; - VRKey vr; + //VRKey vr; bool used; // will be set to false when something wrong happens to an Entry. // (Entry will then be deleted) bool delim_mode_intern = delim_mode; @@ -1064,7 +1067,7 @@ void Document::ParseDES(DocEntrySet *set, long offset, if( Debug::GetDebugFlag() ) std::cout << std::dec <<"(long)(Fp->tellg()) " << (long)(Fp->tellg()) // in Debug mode << std::hex << " 0x(" <<(long)(Fp->tellg()) << ")" << std::endl; -*/ + */ // if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max) // Once per DocEntry if ( !delim_mode ) // 'and then' doesn't exist in C++ :-( @@ -1072,19 +1075,20 @@ void Document::ParseDES(DocEntrySet *set, long offset, { break; } - newDocEntry = ReadNextDocEntry( ); - // Uncoment this cerr line to be able to 'follow' the DocEntries - // when something *very* strange happens - if( Debug::GetDebugFlag() ) - std::cerr<GetKey()<<" "<GetVR()<GetKey()<<" "<GetVR()<GetVR(); + //vr = newDocEntry->GetVR(); // useless ? if ( !set->AddEntry( newDataEntry ) ) { @@ -1377,10 +1381,10 @@ DocEntry *Document::Backtrack(DocEntry *docEntry) */ void Document::LoadDocEntry(DocEntry *entry, bool forceLoad) { - uint16_t group = entry->GetGroup(); - uint16_t elem = entry->GetElement(); + uint16_t group = entry->GetGroup(); + uint16_t elem = entry->GetElement(); const VRKey &vr = entry->GetVR(); - uint32_t length = entry->GetLength(); + uint32_t length = entry->GetLength(); // Fp->seekg((long)entry->GetOffset(), std::ios::beg); // JPRx @@ -1803,6 +1807,7 @@ bool Document::IsDocEntryAnInteger(DocEntry *entry) // encounter such an ill-formed image, we simply display a warning // message and proceed on parsing (while crossing fingers). long filePosition = Fp->tellg(); // Only when elem 0x0000 length is not 4 (?!?) + (void)filePosition; gdcmWarningMacro( "Erroneous Group Length element length on : (" << std::hex << group << " , " << elem << ") -before- position x(" << filePosition << ")"