gdcmType.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __gdcmType_h
00017 #define __gdcmType_h
00018
00019 #include "gdcmTypes.h"
00020
00021 #include <iostream>
00022
00023 namespace gdcm
00024 {
00025
00041 class GDCM_EXPORT Type
00042 {
00043 public:
00044 typedef enum {
00045 T1 = 0,
00046 T1C,
00047 T2,
00048 T2C,
00049 T3,
00050 UNKNOWN
00051 } TypeType;
00052
00053 Type(TypeType type = UNKNOWN) : TypeField(type) { }
00054
00055 operator TypeType () const { return TypeField; }
00056 friend std::ostream &operator<<(std::ostream &os, const Type &vr);
00057
00058 static const char *GetTypeString(TypeType type);
00059 static TypeType GetTypeType(const char *type);
00060
00061 private:
00062 TypeType TypeField;
00063 };
00064
00065 inline std::ostream &operator<<(std::ostream &_os, const Type &val)
00066 {
00067 _os << Type::GetTypeString(val.TypeField);
00068 return _os;
00069 }
00070
00071 }
00072
00073 #endif //__gdcmType_h