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);
89 /// \brief Sets the depth level of a Sequence Entry embedded in a SeQuence
90 void gdcmSeqEntry::SetDepthLevel(int depth) {
94 //-----------------------------------------------------------------------------
98 //-----------------------------------------------------------------------------
101 // end-user intended : the guy *wants* to create his own SeQuence ?!?
103 /// \brief to be written, if really usefull
104 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByNumber(guint16 group,
107 std::cout << "TODO : gdcmSeqEntry::NewDocEntryByNumber " << endl;
112 /// \brief to be written, if really usefull
113 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByName (std::string Name) {
115 std::cout << "TODO : gdcmSeqEntry::NewDocEntryByName " << endl;
120 /// \brief to be written, if really usefull
121 gdcmDocEntry *gdcmSeqEntry::GetDocEntryByNumber(guint16 group,
124 std::cout << "TODO : gdcmSeqEntry::GetDocEntryByNumber " << endl;
128 //-----------------------------------------------------------------------------