Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2008/01/02 10:48:52 $
- Version: $Revision: 1.377 $
+ Date: $Date: 2008/01/07 18:12:02 $
+ Version: $Revision: 1.379 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
/////////////////////// SeqEntry : VR = "SQ"
- unsigned long l = newDocEntry->GetReadLength();
+ unsigned long l = newDocEntry->GetReadLength();
if ( l != 0 ) // don't mess the delim_mode for 'zero-length sequence'
{
if ( l == 0xffffffff )
first = false;
if (UnexpectedEOF) // some terminator was missing
+ {
break;
+ }
} // end While
gdcmDebugMacro( "Exit from ParseDES, delim-mode " << delim_mode );
}
if (offsetStartCurrentSQItem <= OffsetOfPreviousParseDES)
{
- gdcmWarningMacro("Bad assumption was made on illegal 'unknown length' UN!");
- gdcmWarningMacro("OffsetOfPreviousParseDES " << std::hex << OffsetOfPreviousParseDES
+ gdcmWarningMacro("Bad assumption was made on illegal 'unknown length' UN!" << std::endl <<
+ "OffsetOfPreviousParseDES " << std::hex << OffsetOfPreviousParseDES
<< " offsetStartCurrentSQItem " << offsetStartCurrentSQItem);
/// \todo when "Bad assumption (SQ) on illegal 'unknown length' UN", Backtrack again + try OB
return false;
{
OffsetOfPreviousParseDES = offsetStartCurrentSQItem;
}
-
+
// fill up the current SQItem, starting at the beginning of fff0,e000
-
Fp->seekg(offsetStartCurrentSQItem, std::ios::beg); // Once per SQItem
ParseDES(itemSQ, offsetStartCurrentSQItem, l+8, dlm_mod);
offsetStartCurrentSQItem = Fp->tellg(); // Once per SQItem
* \brief When a private Sequence + Implicit VR is encountered
* we cannot guess it's a Sequence till we find the first
* Item Starter. We then backtrack to do the job.
- * @param docEntry Item Starter that warned us
+ * @param docEntry Item Starter that warned us
+ * @param set DocEntrySet (ElementSet/SQItem) the DocEntry will belong
*/
DocEntry *Document::Backtrack(DocEntry *docEntry, DocEntrySet *set)
{
{
gdcmWarningMacro(
"Neither an Item tag nor a Sequence delimiter tag on :"
- << std::hex << group << " , " << elem
- << ")" );
+ << std::hex << group << "|" << elem << ") Pos. on entry was 0x(" <<positionOnEntry<< ") "
+ );
Fp->seekg(positionOnEntry, std::ios::beg); // Once per fragment (if any) of OB,OW DataElements
throw FormatUnexpected(
if ( !Global::GetVR()->IsValidVR(vr) )
{
- gdcmWarningMacro( "Unknown VR " << vr.GetHexaRepresentation()
+ gdcmWarningMacro( "Unknown VR " << vr.GetHexaRepresentation() << std::hex
<< " at offset : 0x(" << CurrentOffsetPosition-4
<< ") for group " << std::hex << CurrentGroup );