GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmIOD.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMIOD_H
15 #define GDCMIOD_H
16
17 #include "gdcmTypes.h"
18 #include "gdcmTag.h"
19 #include "gdcmIODEntry.h"
20
21 #include <vector>
22
23 namespace gdcm
24 {
25 class DataSet;
26 class Defs;
27
34 class GDCM_EXPORT IOD
35 {
36 public:
37 typedef std::vector<IODEntry> MapIODEntry;
38 typedef MapIODEntry::size_type SizeType;
39
40 IOD() {}
41 friend std::ostream& operator<<(std::ostream& _os, const IOD &_val);
42
43 void Clear() { IODInternal.clear(); }
44
45 void AddIODEntry(const IODEntry & iode)
46 {
47 IODInternal.push_back(iode);
48 }
49
50 SizeType GetNumberOfIODs() const {
51 return IODInternal.size();
52 }
53
54 const IODEntry& GetIODEntry(SizeType idx) const
55 {
56 return IODInternal[idx];
57 }
58
59 Type GetTypeFromTag(const Defs &defs, const Tag& tag) const;
60
61 private:
62 //IOD &operator=(const IOD &_val); // purposely not implemented
63 //IOD(const IOD &_val); // purposely not implemented
64
65 MapIODEntry IODInternal;
66 };
67 //-----------------------------------------------------------------------------
68 inline std::ostream& operator<<(std::ostream& _os, const IOD &_val)
69 {
70 IOD::MapIODEntry::const_iterator it = _val.IODInternal.begin();
71 for(;it != _val.IODInternal.end(); ++it)
72 {
73 _os << *it << '\n';
74 }
75
76 return _os;
77 }
78
79 } // end namespace gdcm
80
81 #endif //GDCMIOD_H