GDCM 3.0.24
gdcmType.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
15#ifndef GDCMTYPE_H
16#define GDCMTYPE_H
17
18#include "gdcmTypes.h"
19
20#include <iostream>
21
22namespace gdcm
23{
24
42{
43public:
44 typedef enum {
45 T1 = 0,
50 UNKNOWN
51 } TypeType;
52
53 Type(TypeType type = UNKNOWN) : TypeField(type) { }
54
55 operator TypeType () const { return TypeField; }
56 friend std::ostream &operator<<(std::ostream &os, const Type &vr);
57
58 static const char *GetTypeString(TypeType type);
59 static TypeType GetTypeType(const char *type);
60
61private:
62 TypeType TypeField;
63};
64//-----------------------------------------------------------------------------
65inline std::ostream &operator<<(std::ostream &_os, const Type &val)
66{
67 _os << Type::GetTypeString(val.TypeField);
68 return _os;
69}
70
71} // end namespace gdcm
72
73#endif //GDCMTYPE_H
Type.
Definition gdcmType.h:42
TypeType
Definition gdcmType.h:44
@ T1C
Definition gdcmType.h:46
@ T2
Definition gdcmType.h:47
@ T3
Definition gdcmType.h:49
@ T2C
Definition gdcmType.h:48
static TypeType GetTypeType(const char *type)
static const char * GetTypeString(TypeType type)
Type(TypeType type=UNKNOWN)
Definition gdcmType.h:53
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition gdcmDirectory.h:88