Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/10 03:09:07 $
- Version: $Revision: 1.169 $
+ Date: $Date: 2005/01/10 17:17:52 $
+ Version: $Revision: 1.171 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
static const char *TransferSyntaxStrings[] = {
// Implicit VR Little Endian
"1.2.840.10008.1.2",
- // Implicit VR Big Endian DLX G.E?
+ // Implicit VR Big Endian DLX (G.E Private)
"1.2.840.113619.5.2",
// Explicit VR Little Endian
"1.2.840.10008.1.2.1",
/**
* \brief Skips to the begining of the next Header Entry
* \warning NOT end user intended method !
- * @param offset start of skipping
- * @param readLgth length to skip
-
+ * @param currentDocEntry entry to skip
*/
-void Document::SkipToNextDocEntry(DocEntry *newDocEntry)
+void Document::SkipToNextDocEntry(DocEntry *currentDocEntry)
{
- Fp->seekg((long)(newDocEntry->GetOffset()), std::ios::beg);
- Fp->seekg( (long)(newDocEntry->GetReadLength()),std::ios::cur);
+ Fp->seekg((long)(currentDocEntry->GetOffset()), std::ios::beg);
+ Fp->seekg( (long)(currentDocEntry->GetReadLength()),std::ios::cur);
}
/**
* the parser went Jabberwocky) one can hope improving things by
* applying some heuristics.
* @param entry entry to check
- * @param foundLength fist assumption about length
+ * @param foundLength first assumption about length
*/
void Document::FixDocEntryFoundLength(DocEntry *entry,
uint32_t foundLength)
*/
bool Document::IsDocEntryAnInteger(DocEntry *entry)
{
- uint16_t element = entry->GetElement();
+ uint16_t elem = entry->GetElement();
uint16_t group = entry->GetGroup();
const std::string &vr = entry->GetVR();
uint32_t length = entry->GetLength();
// When we have some semantics on the element we just read, and if we
// a priori know we are dealing with an integer, then we shall be
// able to swap it's element value properly.
- if ( element == 0 ) // This is the group length of the group
+ if ( elem == 0 ) // This is the group length of the group
{
if ( length == 4 )
{
// message and proceed on parsing (while crossing fingers).
long filePosition = Fp->tellg();
gdcmVerboseMacro( "Erroneous Group Length element length on : ("
- << std::hex << group << " , " << element
+ << std::hex << group << " , " << elem
<< ") -before- position x(" << filePosition << ")"
<< "lgt : " << length );
}
}
catch ( FormatError )
{
- throw FormatError("Document::FindDocEntryLengthOBOrOW()",
- " group or element not present.");
+ throw FormatError("Unexpected end of file encountered during ",
+ "Document::FindDocEntryLengthOBOrOW()");
}
// We have to decount the group and element we just read
if ( group != 0xfffe || ( ( elem != 0xe0dd ) && ( elem != 0xe000 ) ) )
{
- gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag.");
+ long filePosition = Fp->tellg();
+ gdcmVerboseMacro( "Neither an Item tag nor a Sequence delimiter tag on :"
+ << std::hex << group << " , " << elem
+ << ") -before- position x(" << filePosition << ")" );
+
Fp->seekg(positionOnEntry, std::ios::beg);
throw FormatUnexpected( "Neither an Item tag nor a Sequence delimiter tag.");
}