GDCM: gdcmType.h Source File

GDCM 3.2.11

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
41 class GDCM_EXPORT Type
42{
43public:
44 typedef enum {
45 T1 = 0,
46 T1C,
47 T2,
48 T2C,
49 T3,
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//-----------------------------------------------------------------------------
65 inline 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
gdcm::Type
Type.
Definition gdcmType.h:42
gdcm::Type::operator<<
friend std::ostream & operator<<(std::ostream &os, const Type &vr)
Definition gdcmType.h:65
gdcm::Type::TypeType
TypeType
Definition gdcmType.h:44
gdcm::Type::T1C
@ T1C
Definition gdcmType.h:46
gdcm::Type::T2
@ T2
Definition gdcmType.h:47
gdcm::Type::UNKNOWN
@ UNKNOWN
Definition gdcmType.h:50
gdcm::Type::T3
@ T3
Definition gdcmType.h:49
gdcm::Type::T1
@ T1
Definition gdcmType.h:45
gdcm::Type::T2C
@ T2C
Definition gdcmType.h:48
gdcm::Type::GetTypeType
static TypeType GetTypeType(const char *type)
gdcm::Type::GetTypeString
static const char * GetTypeString(TypeType type)
gdcm::Type::Type
Type(TypeType type=UNKNOWN)
Definition gdcmType.h:53
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