Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/03/22 11:29:37 $
- Version: $Revision: 1.233 $
+ Date: $Date: 2005/04/24 20:54:45 $
+ Version: $Revision: 1.236 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/**
* \brief This default constructor neither loads nor parses the file.
- * You should then invoke \ref Document::SetFileName
- * and \ref Document::Load.
+ * You should then invoke \ref Document::Load.
*
*/
Document::Document()
SwapCode = 1234;
Filetype = ExplicitVR;
Group0002Parsed = false;
- LoadMode = 0x00000000; // Load everything
+ LoadMode = 0x00000000; // default : load everything, later
}
/**
Fp = new std::ifstream(Filename.c_str(), std::ios::in | std::ios::binary);
if( ! *Fp )
{
- gdcmDebugMacro( "Cannot open file: " << Filename.c_str());
+ gdcmErrorMacro( "Cannot open file: " << Filename.c_str());
delete Fp;
- Fp = 0;
- return 0;
+ exit(1);
}
uint16_t zero = 0;
delim_mode = false;
}
}
-
+
if ( (LoadMode & NO_SEQ) && ! delim_mode ) // User asked to skip SQ
{
Fp->seekg( l, std::ios::cur);
{
//s << "gdcm::NotLoaded (BinEntry)";
s << GDCM_NOTLOADED;
- s << " Address:" << (long)entry->GetOffset();
- s << " Length:" << entry->GetLength();
+ s << " Ad.:" << (long)entry->GetOffset();
+ s << " x(" << std::hex << entry->GetOffset() << ")";
+ s << std::dec;
+ s << " Lgt:" << entry->GetLength();
s << " x(" << std::hex << entry->GetLength() << ")";
binEntryPtr->SetValue(s.str());
}