GDCM  2.2.6
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 
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 
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
Class for representing a IODEntry.
Definition: gdcmIODEntry.h:51
MapIODEntry::size_type SizeType
Definition: gdcmIOD.h:38
Type.
Definition: gdcmType.h:41
void Clear()
Definition: gdcmIOD.h:43
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
FIXME I do not like the name &#39;Defs&#39;.
Definition: gdcmDefs.h:32
IOD()
Definition: gdcmIOD.h:40
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:92
std::vector< IODEntry > MapIODEntry
Definition: gdcmIOD.h:37
const IODEntry & GetIODEntry(SizeType idx) const
Definition: gdcmIOD.h:54
void AddIODEntry(const IODEntry &iode)
Definition: gdcmIOD.h:45
Class for representing a IOD.
Definition: gdcmIOD.h:34
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element). Basically an uint32_t which...
Definition: gdcmTag.h:38
SizeType GetNumberOfIODs() const
Definition: gdcmIOD.h:50

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo