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
00042 class GDCM_EXPORT Type
00043 {
00044 public:
00045 typedef enum {
00046 T1 = 0,
00047 T1C,
00048 T2,
00049 T2C,
00050 T3,
00051 UNKNOWN
00052 } TypeType;
00053
00054 Type(TypeType type = UNKNOWN) : TypeField(type) { }
00055
00056 operator TypeType () const { return TypeField; }
00057 friend std::ostream &operator<<(std::ostream &os, const Type &vr);
00058
00059 static const char *GetTypeString(TypeType type);
00060 static TypeType GetTypeType(const char *type);
00061
00062 private:
00063 TypeType TypeField;
00064 };
00065
00066 inline std::ostream &operator<<(std::ostream &_os, const Type &val)
00067 {
00068 _os << Type::GetTypeString(val.TypeField);
00069 return _os;
00070 }
00071
00072 }
00073
00074 #endif //GDCMTYPE_H