GDCM 2.2.1

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

- File List
- File Members

gdcmPDBHeader.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 GDCMPDBHEADER_H
15 #define GDCMPDBHEADER_H
16
17 #include "gdcmTypes.h"
18 #include "gdcmDataSet.h"
19 #include "gdcmPDBElement.h"
20
21 namespace gdcm
22 {
23
24 /*
25 * Everything done in this code is for the sole purpose of writing interoperable
26 * software under Sect. 1201 (f) Reverse Engineering exception of the DMCA.
27 * If you believe anything in this code violates any law or any of your rights,
28 * please contact us (gdcm-developers@lists.sourceforge.net) so that we can
29 * find a solution.
30 */
31 //-----------------------------------------------------------------------------
32
33 class DataElement;
34 class PrivateTag;
51 class GDCM_EXPORT PDBHeader
52 {
53 friend std::ostream& operator<<(std::ostream &_os, const PDBHeader &d);
54 public :
55 PDBHeader() {}
56 ~PDBHeader() {}
57
59 bool LoadFromDataElement(DataElement const &de);
60
62 void Print(std::ostream &os) const;
63
65 static const PrivateTag & GetPDBInfoTag();
66
69 const PDBElement &GetPDBElementByName(const char *name);
70
72 bool FindPDBElementByName(const char *name);
73
74 protected:
75 const PDBElement& GetPDBEEnd() const;
76
77 private:
78 int readprotocoldatablock(const char *input, size_t inputlen, bool verbose);
79 std::vector<PDBElement> InternalPDBDataSet;
80 static PDBElement PDBEEnd;
81 };
82 //-----------------------------------------------------------------------------
83 inline std::ostream& operator<<(std::ostream &os, const PDBHeader &d)
84 {
85 d.Print( os );
86 return os;
87 }
88
89 } // end namespace gdcm
90 //-----------------------------------------------------------------------------
91 #endif //GDCMPDBHEADER_H