GDCM  2.2.6
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 
22 namespace gdcm
23 {
24 
42 {
43 public:
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 
61 private:
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
Type(TypeType type=UNKNOWN)
Definition: gdcmType.h:53
Definition: gdcmType.h:49
static const char * GetTypeString(TypeType type)
Type.
Definition: gdcmType.h:41
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
Definition: gdcmType.h:48
std::ostream & operator<<(std::ostream &os, const Directory &d)
Definition: gdcmDirectory.h:92
Definition: gdcmType.h:46
TypeType
Definition: gdcmType.h:44
Definition: gdcmType.h:47

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