Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 08:57:14 $
- Version: $Revision: 1.106 $
+ Date: $Date: 2005/01/19 15:24:28 $
+ Version: $Revision: 1.107 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
{
src->RemoveEntryNoDestroy(entry);
dst->AddEntry(entry);
- entry = src->GetNextEntry();
+ // we destroyed -> the current iterator is not longer valid
+ entry = src->GetFirstEntry();
}
}
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/01/18 14:28:32 $
- Version: $Revision: 1.45 $
+ Date: $Date: 2005/01/19 15:24:28 $
+ Version: $Revision: 1.46 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
entry->SetPrintLevel(PrintLevel);
entry->Print(os);
- if ( /*SeqEntry *seqEntry = */dynamic_cast<SeqEntry*>(entry) )
+ if ( dynamic_cast<SeqEntry*>(entry) )
{
- //(void)seqEntry;
// Avoid the newline for a sequence:
continue;
}
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2005/01/19 08:55:09 $
- Version: $Revision: 1.54 $
+ Date: $Date: 2005/01/19 15:24:28 $
+ Version: $Revision: 1.55 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
}
/**
- * \brief Clear the hash table from given entry AND delete the entry.
+ * \brief Clear the std::list from given entry AND delete the entry.
* @param entryToRemove Entry to remove AND delete.
* \warning Some problems when using under Windows... prefer the use of
* Initialize / GetNext methods
if( *it == entryToRemove)
{
DocEntries.erase(it);
- gdcmVerboseMacro( "One element erased.");
+ gdcmVerboseMacro( "One element erased: " << entryToRemove->GetKey() );
delete entryToRemove;
return true;
}
}
- gdcmVerboseMacro( "Value not present.");
+ gdcmVerboseMacro( "Entry not found: " << entryToRemove->GetKey() );
return false ;
}
/**
- * \brief Clear the hash table from given entry BUT keep the entry.
+ * \brief Clear the std::list from given entry BUT keep the entry.
* @param entryToRemove Entry to remove.
* @return true if the entry was found and removed; false otherwise
*/
if( *it == entryToRemove)
{
DocEntries.erase(it);
- gdcmVerboseMacro( "One element erased.");
+ gdcmVerboseMacro( "One element erased, no destroyed: "
+ << entryToRemove->GetKey() );
return true;
}
}
- gdcmVerboseMacro( "Value not present.");
+ gdcmVerboseMacro( "Entry not found:" << entryToRemove->GetKey() );
return false ;
}
*/
DocEntry *SQItem::GetNextEntry()
{
- gdcmAssertMacro (ItDocEntries != DocEntries.end());
+ // gdcmAssertMacro (ItDocEntries != DocEntries.end());
{
++ItDocEntries;
if (ItDocEntries != DocEntries.end())
std::string SQItem::GetEntry(uint16_t group, uint16_t elem)
{
+
+/*
+ DocEntry *e = GetFirstEntry();
+ while (e)
+ {
+ if ( e->GetGroup() == group && e->GetElement() == elem)
+ {
+
+ if (ValEntry *ve = dynamic_cast<ValEntry*>(e))
+ return ve->GetValue();
+ }
+ e = GetNextEntry();
+ }
+*/
for(ListDocEntry::iterator i = DocEntries.begin();
i != DocEntries.end(); ++i)
{
if ( (*i)->GetGroup() == group && (*i)->GetElement() == elem)
{
- if (ValEntry *e = dynamic_cast<ValEntry*>(*i))
- return e->GetValue();
+ if (ValEntry *ve = dynamic_cast<ValEntry*>(*i))
+ return ve->GetValue();
}
}
return GDCM_UNFOUND;