Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2004/07/19 04:15:41 $
- Version: $Revision: 1.52 $
+ Date: $Date: 2004/07/19 05:57:20 $
+ Version: $Revision: 1.53 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// The actual transfer (as read from disk) might be padded. We
// first need to remove the potential padding. We can make the
// weak assumption that padding was not executed with digits...
-// while ( ! isdigit(transfer[transfer.length()-1]) )
-// {
-// transfer.erase(transfer.length()-1, 1);
-// }
-// if ( transfer == syntaxToCheck )
- if( transfer.find( syntaxToCheck ) ) //should be faster
+ while ( ! isdigit(transfer[transfer.length()-1]) )
+ {
+ transfer.erase(transfer.length()-1, 1);
+ }
+ if ( transfer == syntaxToCheck )
+ //if( transfer.find( syntaxToCheck ) ) //should be faster
{
return true;
}
*/
gdcmDocEntry *gdcmDocument::ReadNextDocEntry()
{
+ uint16_t g = ReadInt16();
+ uint16_t n = ReadInt16();
+
if (errno == 1)
{
// We reached the EOF (or an error occured) therefore
// header parsing has to be considered as finished.
return 0;
}
-
- uint16_t g = ReadInt16();
- uint16_t n = ReadInt16();
gdcmDocEntry *newEntry = NewDocEntryByNumber(g, n);
FindDocEntryVR(newEntry);