2 //-----------------------------------------------------------------------------
4 #include "gdcmSeqEntry.h"
5 #include "gdcmSQItem.h"
7 #include "gdcmGlobal.h"
12 //-----------------------------------------------------------------------------
13 // Constructor / Destructor
15 * \ingroup gdcmSeqEntry
16 * \brief Constructor from a given gdcmSeqEntry
18 gdcmSeqEntry::gdcmSeqEntry(gdcmDictEntry* e, int depth)
21 delimitor_mode = false;
23 SQDepthLevel = depth; // +1; // ??
27 * \ingroup gdcmSeqEntry
28 * \brief Canonical destructor.
30 gdcmSeqEntry::~gdcmSeqEntry() {
31 for(ListSQItem::iterator cc = items.begin();cc != items.end();++cc)
39 //-----------------------------------------------------------------------------
42 * \ingroup gdcmSeqEntry
43 * \brief canonical Printer
45 void gdcmSeqEntry::Print(std::ostream &os){
47 std::ostringstream s,s2;
49 unsigned short int g, e;
52 char greltag[10]; //group element tag
55 // First, Print the Dicom Element itself.
61 // Then, Print each SQ Item
62 for(ListSQItem::iterator cc = items.begin();cc != items.end();++cc)
64 //(*cc)->SetPrintLevel(GetPrintLevel()); aurait-ce un sens ?
67 // at end, print the sequence terminator item, if any
72 if (seq_term != NULL) {
76 std::cout << " -------------- should have a sequence terminator item"
81 //-----------------------------------------------------------------------------
84 /// \brief adds the passed ITEM to the ITEM chained List for this SeQuence.
85 void gdcmSeqEntry::AddEntry(gdcmSQItem *sqItem) {
86 items.push_back(sqItem);
90 void gdcmSeqEntry::SetDepthLevel(int depth) {
93 //-----------------------------------------------------------------------------
97 //-----------------------------------------------------------------------------
100 // end-user intended : the guy *wants* to create his own SeQuence ?!?
102 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByNumber(guint16 group,
109 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByName (std::string Name) {
115 gdcmDocEntry *gdcmSeqEntry::GetDocEntryByNumber(guint16 group,
121 //-----------------------------------------------------------------------------