GDCM: gdcmIOD.h Source File

GDCM 3.2.5

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
34 class GDCM_EXPORT IOD
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
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
61private:
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
gdcm::DataSet
Class to represent a Data Set (which contains Data Elements).
Definition gdcmDataSet.h:56
gdcm::Defs
FIXME I do not like the name 'Defs'.
Definition gdcmDefs.h:33
gdcm::IODEntry
Class for representing a IODEntry.
Definition gdcmIODEntry.h:52
gdcm::IOD::AddIODEntry
void AddIODEntry(const IODEntry &iode)
Definition gdcmIOD.h:45
gdcm::IOD::GetIODEntry
const IODEntry & GetIODEntry(SizeType idx) const
Definition gdcmIOD.h:54
gdcm::IOD::MapIODEntry
std::vector< IODEntry > MapIODEntry
Definition gdcmIOD.h:37
gdcm::IOD::operator<<
friend std::ostream & operator<<(std::ostream &_os, const IOD &_val)
Definition gdcmIOD.h:68
gdcm::IOD::Clear
void Clear()
Definition gdcmIOD.h:43
gdcm::IOD::SizeType
MapIODEntry::size_type SizeType
Definition gdcmIOD.h:38
gdcm::IOD::GetTypeFromTag
Type GetTypeFromTag(const Defs &defs, const Tag &tag) const
gdcm::IOD::IOD
IOD()=default
gdcm::IOD::GetNumberOfIODs
SizeType GetNumberOfIODs() const
Definition gdcmIOD.h:50
gdcm::Tag
Class to represent a DICOM Data Element (Attribute) Tag (Group, Element).
Definition gdcmTag.h:39
gdcm::Type
Type.
Definition gdcmType.h:42
gdcmIODEntry.h
gdcmTag.h
gdcmTypes.h
GDCM_EXPORT
#define GDCM_EXPORT
Definition gdcmWin32.h:34
gdcm
Definition gdcmASN1.h:21
gdcm::operator<<
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88