GDCM 3.0.24
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
23namespace gdcm
24{
25class DataSet;
26class Defs;
27
35{
36public:
37 typedef std::vector<IODEntry> MapIODEntry;
38 typedef MapIODEntry::size_type SizeType;
39
40 IOD() = default;
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
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
61private:
62 //IOD &operator=(const IOD &_val); // purposely not implemented
63 //IOD(const IOD &_val); // purposely not implemented
64
65 MapIODEntry IODInternal;
66};
67//-----------------------------------------------------------------------------
68inline 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
FIXME I do not like the name 'Defs'.
Definition gdcmDefs.h:33
Class for representing a IODEntry.
Definition gdcmIODEntry.h:52
Class for representing a IOD.
Definition gdcmIOD.h:35
void AddIODEntry(const IODEntry &iode)
Definition gdcmIOD.h:45
const IODEntry & GetIODEntry(SizeType idx) const
Definition gdcmIOD.h:54
std::vector< IODEntry > MapIODEntry
Definition gdcmIOD.h:37
void Clear()
Definition gdcmIOD.h:43
MapIODEntry::size_type SizeType
Definition gdcmIOD.h:38
Type GetTypeFromTag(const Defs &defs, const Tag &tag) const
IOD()=default
SizeType GetNumberOfIODs() const
Definition gdcmIOD.h:50
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
Type.
Definition gdcmType.h:42
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88