Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/07/06 08:42:33 $
- Version: $Revision: 1.257 $
+ Date: $Date: 2005/07/06 09:25:12 $
+ Version: $Revision: 1.258 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
bool Document::Load( std::string const &fileName )
{
- // We should clean out anything that already exists.
- // Check IsDocumentAlreadyLoaded to be sure.
if ( IsDocumentAlreadyLoaded )
{
gdcmWarningMacro( "A file was already parsed inside this "
<< "gdcm::Document (previous name was: "
<< Filename.c_str() << ". New name is :"
<< fileName );
- // todo : clean out the 'Document'
- // Should we call ClearEntry() on the parent object ?!?
+ // clean out the Entries, if already parsed
+ // (probabely a mistake from the user)
+ ClearEntry();
}
Filename = fileName;
LoadDocEntry( newBinEntry );
if ( !set->AddEntry( newBinEntry ) )
{
- //gdcmWarningMacro( "in ParseDES : cannot add a BinEntry "
- // << newBinEntry->GetKey() );
+ gdcmWarningMacro( "in ParseDES : cannot add a BinEntry "
+ << newBinEntry->GetKey() );
used=false;
}
}
if ( !set->AddEntry( newValEntry ) )
{
- //gdcmWarningMacro( "in ParseDES : cannot add a ValEntry "
- // << newValEntry->GetKey() );
+ gdcmWarningMacro( "in ParseDES : cannot add a ValEntry "
+ << newValEntry->GetKey() );
used=false;
}
}
if ( !set->AddEntry( newSeqEntry ) )
{
- //gdcmWarningMacro( "in ParseDES : cannot add a SeqEntry "
- // << newSeqEntry->GetKey() );
+ gdcmWarningMacro( "in ParseDES : cannot add a SeqEntry "
+ << newSeqEntry->GetKey() );
used = false;
}