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) {
77 << " -------------- should have a sequence terminator item"
82 //-----------------------------------------------------------------------------
85 /// \brief adds the passed ITEM to the ITEM chained List for this SeQuence.
86 void gdcmSeqEntry::AddEntry(gdcmSQItem *sqItem) {
87 items.push_back(sqItem);
90 /// \brief Sets the depth level of a Sequence Entry embedded in a SeQuence
91 void gdcmSeqEntry::SetDepthLevel(int depth) {
95 //-----------------------------------------------------------------------------
99 //-----------------------------------------------------------------------------
102 // end-user intended : the guy *wants* to create his own SeQuence ?!?
104 /// \brief to be written, if really usefull
105 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByNumber(guint16 group,
108 std::cout << "TODO : gdcmSeqEntry::NewDocEntryByNumber " << std::endl;
113 /// \brief to be written, if really usefull
114 gdcmDocEntry *gdcmSeqEntry::NewDocEntryByName (std::string Name) {
116 std::cout << "TODO : gdcmSeqEntry::NewDocEntryByName " << std::endl;
121 /// \brief to be written, if really usefull
122 gdcmDocEntry *gdcmSeqEntry::GetDocEntryByNumber(guint16 group,
125 std::cout << "TODO : gdcmSeqEntry::GetDocEntryByNumber " << std::endl;
129 //-----------------------------------------------------------------------------