* src/gdcmSQItem.cxx : initialize the SQItemNumber value in the constructor
* src/gdcmSQItem.[h|cxx], gdcmElementSet.[h|cxx], gdcmDicomDir*.[h|cxx] :
Add ClearXxx methods to remove all the content of the list or map
* gdcmDocEntrySet.h : add GetFirst/NextEntry in pure virtual
-- BeNours
15 files changed:
+2005-01-25 Benoit Regrain <Benoit.Regrain@creatis.insa-lyon.fr>
+ * src/gdcmDocument.cxx : bug fix on potential memory leak
+ * src/gdcmSQItem.cxx : initialize the SQItemNumber value in the constructor
+ * src/gdcmSQItem.[h|cxx], gdcmElementSet.[h|cxx], gdcmDicomDir*.[h|cxx] :
+ Add ClearXxx methods to remove all the content of the list or map
+ * gdcmDocEntrySet.h : add GetFirst/NextEntry in pure virtual
+
2005-01-24 Mathieu Malaterre <Mathieu.Malaterre@creatis.insa-lyon.fr>
* Grealty simplify the JPEg decompression, no need to differenciate based on
the JPEG possible type (with/without fragment, with/without multiple frame).
2005-01-24 Mathieu Malaterre <Mathieu.Malaterre@creatis.insa-lyon.fr>
* Grealty simplify the JPEg decompression, no need to differenciate based on
the JPEG possible type (with/without fragment, with/without multiple frame).
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDir.cxx,v $
Language: C++
- Date: $Date: 2005/01/24 16:10:52 $
- Version: $Revision: 1.116 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.117 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
SetProgressMethod(NULL);
SetEndMethod(NULL);
SetProgressMethod(NULL);
SetEndMethod(NULL);
- for(ListDicomDirPatient::iterator cc = Patients.begin();
- cc!= Patients.end();
- ++cc)
- {
- delete *cc;
- }
if ( MetaElems )
{
delete MetaElems;
if ( MetaElems )
{
delete MetaElems;
// friend class hunting : we miss GetLastEntry and GetPreviousEntry
// to be able to remove any direct reference to TagHT
// friend class hunting : we miss GetLastEntry and GetPreviousEntry
// to be able to remove any direct reference to TagHT
-
- DocEntry *e = GetFirstEntry();
- if (e)
+ DocEntry *entry = GetFirstEntry();
+ if( entry )
//if ( TagHT.begin() != TagHT.end() ) // after Document Parsing
{
MetaElems = new DicomDirMeta(true);
//if ( TagHT.begin() != TagHT.end() ) // after Document Parsing
{
MetaElems = new DicomDirMeta(true);
- TagDocEntryHT::iterator lastOneButSequence = TagHT.end();
+ entry = GetFirstEntry();
+ while( entry )
+ {
+ if( dynamic_cast<SeqEntry *>(entry) )
+ break;
+
+ RemoveEntryNoDestroy(entry);
+ MetaElems->AddEntry(entry);
+
+ entry = GetFirstEntry();
+ }
+ /*TagDocEntryHT::iterator lastOneButSequence = TagHT.end();
lastOneButSequence --;
// ALL the 'out of Sequence' Tags belong to Meta Elems
// (we skip 0004|1220 [Directory record sequence] )
lastOneButSequence --;
// ALL the 'out of Sequence' Tags belong to Meta Elems
// (we skip 0004|1220 [Directory record sequence] )
++cc)
{
MetaElems->AddEntry( cc->second );
++cc)
{
MetaElems->AddEntry( cc->second );
}
else // after root directory parsing
{
}
else // after root directory parsing
{
- * \brief adds a new Patient (with the basic elements) to a partially created DICOMDIR
+ * \brief adds a new Patient (with the basic elements) to a partially created
+ * DICOMDIR
*/
DicomDirPatient *DicomDir::NewPatient()
{
*/
DicomDirPatient *DicomDir::NewPatient()
{
+/**
+ * \brief Remove all Patients
+ */
+void DicomDir::ClearPatient()
+{
+ for(ListDicomDirPatient::iterator cc = Patients.begin();
+ cc!= Patients.end();
+ ++cc)
+ {
+ delete *cc;
+ }
+ Patients.clear();
+}
+
/**
* \brief adds to the HTable
* the Entries (Dicom Elements) corresponding to the given type
/**
* \brief adds to the HTable
* the Entries (Dicom Elements) corresponding to the given type
- if( si )
- MoveSQItem(si,tmpSI);
+ //if( si )
+ //MoveSQItem(si,tmpSI);
tmpSI=s->GetNextSQItem();
}
// friend hunting : this one will be difficult to remove !
tmpSI=s->GetNextSQItem();
}
// friend hunting : this one will be difficult to remove !
study->AddSerie(dd);
return true;
}
study->AddSerie(dd);
return true;
}
-/* if( (*itp)->GetDicomDirStudies().size() > 0 )
- {
- ListDicomDirStudy::const_iterator itst =
- (*itp)->GetDicomDirStudies().end();
- itst--;
- (*itst)->AddSerie(dd);
- return true;
- }*/
-/* if( (*itp)->GetDicomDirStudies().size() > 0 )
- {
- ListDicomDirStudy::const_iterator itst =
- (*itp)->GetDicomDirStudies().end();
- itst--;
-
- if( (*itst)->GetDicomDirSeries().size() > 0 )
- {
- ListDicomDirSerie::const_iterator its = (*itst)->GetDicomDirSeries().end();
- its--;
- (*its)->AddImage(dd);
- return true;
- }
- }*/
*/
void DicomDir::SetElements(std::string const & path, VectDocument const &list)
{
*/
void DicomDir::SetElements(std::string const & path, VectDocument const &list)
{
- TagHT.clear();
- Patients.clear();
+ ClearEntry();
+ ClearPatient();
std::string patPrevName = "", patPrevID = "";
std::string studPrevInstanceUID = "", studPrevID = "";
std::string patPrevName = "", patPrevID = "";
std::string studPrevInstanceUID = "", studPrevID = "";
* @param dst destination SQItem
* @param src source SQItem
*/
* @param dst destination SQItem
* @param src source SQItem
*/
-void DicomDir::MoveSQItem(SQItem *dst,SQItem *src)
+void DicomDir::MoveSQItem(DocEntrySet *dst,DocEntrySet *src)
Program: gdcm
Module: $RCSfile: gdcmDicomDir.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDir.h,v $
Language: C++
- Date: $Date: 2005/01/20 11:09:23 $
- Version: $Revision: 1.49 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.50 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
DicomDirMeta *NewMeta();
DicomDirPatient *NewPatient();
DicomDirMeta *NewMeta();
DicomDirPatient *NewPatient();
+ /// Removing
+ void ClearPatient();
+
/// Write
bool WriteDicomDir(std::string const &fileName);
/// Write
bool WriteDicomDir(std::string const &fileName);
void SetElements(std::string const &path, VectDocument const &list);
void SetElement (std::string const &path, DicomDirType type,
Document *header);
void SetElements(std::string const &path, VectDocument const &list);
void SetElement (std::string const &path, DicomDirType type,
Document *header);
- void MoveSQItem(SQItem *dst,SQItem *src);
+ void MoveSQItem(DocEntrySet *dst,DocEntrySet *src);
static bool HeaderLessThan(Document *header1, Document *header2);
static bool HeaderLessThan(Document *header1, Document *header2);
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.cxx,v $
Language: C++
- Date: $Date: 2005/01/23 10:12:33 $
- Version: $Revision: 1.31 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.32 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirPatient::~DicomDirPatient()
{
*/
DicomDirPatient::~DicomDirPatient()
{
- for(ListDicomDirStudy::const_iterator cc = Studies.begin();
- cc != Studies.end();
- ++cc )
- {
- delete *cc;
- }
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
+/**
+ * \brief Remove all studies in the patient
+ */
+void DicomDirPatient::ClearStudy()
+{
+ for(ListDicomDirStudy::const_iterator cc = Studies.begin();
+ cc != Studies.end();
+ ++cc )
+ {
+ delete *cc;
+ }
+ Studies.clear();
+}
+
/**
* \brief Get the first entry while visiting the DicomDirStudy
* \return The first DicomDirStudy if found, otherwhise NULL
/**
* \brief Get the first entry while visiting the DicomDirStudy
* \return The first DicomDirStudy if found, otherwhise NULL
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirPatient.h,v $
Language: C++
- Date: $Date: 2005/01/20 16:16:42 $
- Version: $Revision: 1.22 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.23 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// adds the passed STUDY to the STUDY chained List for this PATIENT.
void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); };
/// adds the passed STUDY to the STUDY chained List for this PATIENT.
void AddStudy(DicomDirStudy *obj) { Studies.push_back(obj); };
DicomDirStudy *NewStudy();
DicomDirStudy *NewStudy();
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.cxx,v $
Language: C++
- Date: $Date: 2005/01/23 10:12:33 $
- Version: $Revision: 1.33 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.34 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirSerie::~DicomDirSerie()
{
*/
DicomDirSerie::~DicomDirSerie()
{
- for(ListDicomDirImage::iterator cc = Images.begin();
- cc != Images.end();
- ++cc)
- {
- delete *cc;
- }
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
- * \brief adds a new Image (with the basic elements) to a partially created DICOMDIR
+ * \brief adds a new Image (with the basic elements) to a partially created
+ * DICOMDIR
*/
DicomDirImage *DicomDirSerie::NewImage()
{
*/
DicomDirImage *DicomDirSerie::NewImage()
{
+/**
+ * \brief Remove all images in the serie
+ */
+void DicomDirSerie::ClearImage()
+{
+ for(ListDicomDirImage::iterator cc = Images.begin();
+ cc != Images.end();
+ ++cc)
+ {
+ delete *cc;
+ }
+ Images.clear();
+}
+
/**
* \brief Get the first entry while visiting the DicomDirImage
* \return The first DicomDirImage if found, otherwhise NULL
/**
* \brief Get the first entry while visiting the DicomDirImage
* \return The first DicomDirImage if found, otherwhise NULL
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirSerie.h,v $
Language: C++
- Date: $Date: 2005/01/20 16:16:42 $
- Version: $Revision: 1.23 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.24 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// adds the passed IMAGE to the IMAGE chained List for this SERIE.
void AddImage(DicomDirImage *obj) { Images.push_back(obj); };
/// adds the passed IMAGE to the IMAGE chained List for this SERIE.
void AddImage(DicomDirImage *obj) { Images.push_back(obj); };
DicomDirImage *NewImage();
DicomDirImage *NewImage();
private:
///chained list of DicomDirImages (to be exploited recursively)
private:
///chained list of DicomDirImages (to be exploited recursively)
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.cxx,v $
Language: C++
- Date: $Date: 2005/01/23 10:12:33 $
- Version: $Revision: 1.30 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.31 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
DicomDirStudy::~DicomDirStudy()
{
*/
DicomDirStudy::~DicomDirStudy()
{
- for(ListDicomDirSerie::iterator cc = Series.begin();
- cc != Series.end();
- ++cc )
- {
- delete *cc;
- }
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
+/**
+ * \brief Remove all series in the study
+ */
+void DicomDirStudy::ClearSerie()
+{
+ for(ListDicomDirSerie::iterator cc = Series.begin();
+ cc != Series.end();
+ ++cc )
+ {
+ delete *cc;
+ }
+ Series.clear();
+}
+
/**
* \brief Get the first entry while visiting the DicomDirSeries
* \return The first DicomDirSerie if found, otherwhise NULL
/**
* \brief Get the first entry while visiting the DicomDirSeries
* \return The first DicomDirSerie if found, otherwhise NULL
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDicomDirStudy.h,v $
Language: C++
- Date: $Date: 2005/01/20 16:16:42 $
- Version: $Revision: 1.21 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.22 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// adds the passed SERIE to the SERIE chained List for this STUDY.
void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); };
/// adds the passed SERIE to the SERIE chained List for this STUDY.
void AddSerie(DicomDirSerie *obj) { Series.push_back(obj); };
DicomDirSerie* NewSerie();
DicomDirSerie* NewSerie();
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDocEntrySet.h,v $
Language: C++
- Date: $Date: 2005/01/24 16:10:52 $
- Version: $Revision: 1.42 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.43 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
// ------- '... =0;' stands for 'Pure Virtual'
// ------- '... =0;' stands for 'Pure Virtual'
+ /// \brief Remove all Entry in the entry set
+ virtual void ClearEntry() = 0;
+
/// \brief adds any type of entry to the entry set
virtual bool AddEntry(DocEntry *Entry) = 0;
/// \brief adds any type of entry to the entry set
virtual bool AddEntry(DocEntry *Entry) = 0;
/// identified by its (group,elem) - Sorry for the name !...-
virtual std::string GetEntryValue(uint16_t group, uint16_t elem) = 0;
/// identified by its (group,elem) - Sorry for the name !...-
virtual std::string GetEntryValue(uint16_t group, uint16_t elem) = 0;
+ virtual DocEntry *GetFirstEntry()=0;
+ virtual DocEntry *GetNextEntry()=0;
+
DictEntry *NewVirtualDictEntry(uint16_t group,
uint16_t elem,
TagName const &vr = GDCM_UNKNOWN,
DictEntry *NewVirtualDictEntry(uint16_t group,
uint16_t elem,
TagName const &vr = GDCM_UNKNOWN,
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmDocument.cxx,v $
Language: C++
- Date: $Date: 2005/01/24 16:43:06 $
- Version: $Revision: 1.207 $
+ Date: $Date: 2005/01/25 11:11:58 $
+ Version: $Revision: 1.208 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
- if ( Filetype == ExplicitVR && ! Global::GetVR()->IsVROfBinaryRepresentable(vr) )
+ if ( Filetype == ExplicitVR &&
+ !Global::GetVR()->IsVROfBinaryRepresentable(vr) )
{
////// Neither ValEntry NOR BinEntry: should mean UNKOWN VR
gdcmVerboseMacro( std::hex << newDocEntry->GetGroup()
{
////// Neither ValEntry NOR BinEntry: should mean UNKOWN VR
gdcmVerboseMacro( std::hex << newDocEntry->GetGroup()
newDocEntry->GetOffset(),
l, delim_mode);
}
newDocEntry->GetOffset(),
l, delim_mode);
}
- set->AddEntry( newSeqEntry );
+ if( !set->AddEntry( newSeqEntry ) )
+ {
+ used = false;
+ }
if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max)
{
if ( !delim_mode && ((long)(Fp->tellg())-offset) >= l_max)
{
+ if( !used )
+ delete newDocEntry;
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmElementSet.cxx,v $
Language: C++
- Date: $Date: 2005/01/24 16:10:52 $
- Version: $Revision: 1.49 $
+ Date: $Date: 2005/01/25 11:11:59 $
+ Version: $Revision: 1.50 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
*/
ElementSet::~ElementSet()
{
*/
ElementSet::~ElementSet()
{
- for(TagDocEntryHT::iterator cc = TagHT.begin();cc != TagHT.end(); ++cc)
- {
- if ( cc->second )
- {
- delete cc->second;
- }
- }
- TagHT.clear();
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// Protected
-
/**
* \brief Checks if a given Dicom Element exists within the H table
* @param group Group number of the searched Dicom Element
/**
* \brief Checks if a given Dicom Element exists within the H table
* @param group Group number of the searched Dicom Element
return ((ValEntry *)TagHT.find(key)->second)->GetValue();
}
return ((ValEntry *)TagHT.find(key)->second)->GetValue();
}
-
-//-----------------------------------------------------------------------------
-// Private
+/**
+ * \brief delete all entries in the ElementSet
+ */
+void ElementSet::ClearEntry()
+{
+ for(TagDocEntryHT::iterator cc = TagHT.begin();cc != TagHT.end(); ++cc)
+ {
+ if ( cc->second )
+ {
+ delete cc->second;
+ }
+ }
+ TagHT.clear();
+}
/**
* \brief add a new Dicom Element pointer to the H Table
/**
* \brief add a new Dicom Element pointer to the H Table
/**
* \brief Get the larst entry while visiting the DocEntrySet
* \return The last DocEntry if found, otherwhise NULL
/**
* \brief Get the larst entry while visiting the DocEntrySet
* \return The last DocEntry if found, otherwhise NULL
+//-----------------------------------------------------------------------------
+// Protected
+
+//-----------------------------------------------------------------------------
+// Private
//-----------------------------------------------------------------------------
} // end namespace gdcm
//-----------------------------------------------------------------------------
} // end namespace gdcm
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmElementSet.h,v $
Language: C++
- Date: $Date: 2005/01/24 16:10:52 $
- Version: $Revision: 1.36 $
+ Date: $Date: 2005/01/25 11:11:59 $
+ Version: $Revision: 1.37 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" );
virtual void Print(std::ostream &os = std::cout, std::string const &indent = "" );
bool AddEntry(DocEntry *Entry);
bool RemoveEntry(DocEntry *EntryToRemove);
bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
bool AddEntry(DocEntry *Entry);
bool RemoveEntry(DocEntry *EntryToRemove);
bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmSQItem.cxx,v $
Language: C++
- Date: $Date: 2005/01/24 16:44:54 $
- Version: $Revision: 1.58 $
+ Date: $Date: 2005/01/25 11:11:59 $
+ Version: $Revision: 1.59 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
: DocEntrySet( )
{
SQDepthLevel = depthLevel;
: DocEntrySet( )
{
SQDepthLevel = depthLevel;
- for(ListDocEntry::iterator cc = DocEntries.begin();
- cc != DocEntries.end();
- ++cc)
- {
- delete *cc;
- }
- DocEntries.clear();
}
//-----------------------------------------------------------------------------
}
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Public
//-----------------------------------------------------------------------------
// Public
+/**
+ * \brief Remove all entry in the Sequence Item
+ */
+void SQItem::ClearEntry()
+{
+ for(ListDocEntry::iterator cc = DocEntries.begin();
+ cc != DocEntries.end();
+ ++cc)
+ {
+ delete *cc;
+ }
+ DocEntries.clear();
+}
+
/**
* \brief adds any Entry (Dicom Element) to the Sequence Item
* @param entry Entry to add
/**
* \brief adds any Entry (Dicom Element) to the Sequence Item
* @param entry Entry to add
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
Program: gdcm
Module: $RCSfile: gdcmSQItem.h,v $
Language: C++
- Date: $Date: 2005/01/24 16:10:53 $
- Version: $Revision: 1.35 $
+ Date: $Date: 2005/01/25 11:11:59 $
+ Version: $Revision: 1.36 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
/// \brief returns the DocEntry chained List for this SQ Item.
ListDocEntry const &GetDocEntries() const { return DocEntries; };
/// \brief returns the DocEntry chained List for this SQ Item.
ListDocEntry const &GetDocEntries() const { return DocEntries; };
- /// \brief adds the passed DocEntry to the DocEntry chained List for
- /// this SQ Item.
bool AddEntry(DocEntry *Entry); // add to the List
bool RemoveEntry(DocEntry *EntryToRemove);
bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);
bool AddEntry(DocEntry *Entry); // add to the List
bool RemoveEntry(DocEntry *EntryToRemove);
bool RemoveEntryNoDestroy(DocEntry *EntryToRemove);