GDCM  2.2.0
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

Generated on Wed Jun 13 2012 20:40:37 for GDCM by doxygen 1.8.1
SourceForge.net Logo