1 /*=========================================================================
4 Module: $RCSfile: gdcmSQItem.h,v $
6 Date: $Date: 2004/10/12 04:35:47 $
7 Version: $Revision: 1.19 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
21 #include "gdcmDocEntrySet.h"
22 #include "gdcmElementSet.h"
24 //#include "gdcmDocEntry.h"
25 //#include "gdcmDocument.h"
26 //#include "gdcmBinEntry.h"
34 //-----------------------------------------------------------------------------
35 typedef std::list<DocEntry *> ListDocEntry;
36 //-----------------------------------------------------------------------------
37 class GDCM_EXPORT SQItem
45 virtual void Print(std::ostream &os = std::cout);
46 virtual void Write(FILE *fp, FileType filetype);
48 /// \brief returns the DocEntry chained List for this SQ Item.
49 ListDocEntry &GetDocEntries() { return docEntries; };
51 /// \brief adds the passed DocEntry to the DocEntry chained List for
53 void AddDocEntry(DocEntry *e) { docEntries.push_back(e); };
55 virtual bool AddEntry(DocEntry *Entry); // add to the List
57 DocEntry *GetDocEntryByNumber(uint16_t group, uint16_t element);
58 // FIXME method to write
59 //DocEntry *GetDocEntryByName (std::string Name);
61 bool SetEntryByNumber(std::string val, uint16_t group, uint16_t element);
63 virtual std::string GetEntryByNumber(uint16_t group, uint16_t element);
65 /// \brief returns the ordinal position of a given SQItem
66 int GetSQItemNumber() { return SQItemNumber; };
68 /// \brief Sets the ordinal position of a given SQItem
69 void SetSQItemNumber(int itemNumber) { SQItemNumber = itemNumber; };
71 /// Accessor on \ref SQDepthLevel.
72 int GetDepthLevel() { return SQDepthLevel; }
74 /// Accessor on \ref SQDepthLevel.
75 void SetDepthLevel(int depth) { SQDepthLevel = depth; }
77 /// Accessor on \ref BaseTagKey.
78 void SetBaseTagKey( BaseTagKey key ) { BaseTagKeyNested = key; }
80 /// Accessor on \ref BaseTagKey.
81 BaseTagKey GetBaseTagKey( ) { return BaseTagKeyNested; }
88 /// \brief chained list of (Elementary) Doc Entries
89 ListDocEntry docEntries;
91 /// \brief SQ Item ordinal number
94 ///\brief pointer to the HTable of the Document,
95 /// (because we don't know it within any DicomDirObject nor any SQItem)
96 TagDocEntryHT *PtagHT;
101 /// \brief Sequences can be nested. This \ref SQDepthLevel represents
102 /// the level of the nesting of instances of this class.
103 /// \ref SQDepthLevel and its \ref SeqEntry::SQDepthLevel
104 /// counterpart are only defined on printing purposes
105 /// (see \ref Print).
108 /// \brief A TagKey of a DocEntry nested in a sequence is prepended
109 /// with this BaseTagKey.
110 BaseTagKey BaseTagKeyNested;
113 } // end namespace gdcm
114 //-----------------------------------------------------------------------------