Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef GDCMPHOTOMETRICINTERPRETATION_H
00017 #define GDCMPHOTOMETRICINTERPRETATION_H
00018
00019 #include "gdcmTypes.h"
00020 #include <iostream>
00021
00022 namespace gdcm
00023 {
00024
00025 class TransferSyntax;
00029 class GDCM_EXPORT PhotometricInterpretation
00030 {
00031 public:
00032 typedef enum {
00033 UNKNOW = 0,
00034 MONOCHROME1,
00035 MONOCHROME2,
00036 PALETTE_COLOR,
00037 RGB,
00038 HSV,
00039 ARGB,
00040 CMYK,
00041 YBR_FULL,
00042 YBR_FULL_422,
00043 YBR_PARTIAL_422,
00044 YBR_PARTIAL_420,
00045 YBR_ICT,
00046 YBR_RCT,
00047
00048
00049
00050 PI_END
00051 } PIType;
00052
00053 PhotometricInterpretation(PIType pi = UNKNOW):PIField(pi) {}
00054
00055 static const char *GetPIString(PIType pi);
00056
00057 const char *GetString() const;
00058
00059
00060 static PIType GetPIType(const char *pi);
00061
00062 static bool IsRetired(PIType pi);
00063
00064 bool IsLossy() const;
00065 bool IsLossless() const;
00066
00068 unsigned short GetSamplesPerPixel() const;
00069
00070
00071
00072
00073
00074
00075 friend std::ostream& operator<<(std::ostream& os, const PhotometricInterpretation& pi);
00076
00077 operator PIType () const { return PIField; }
00078
00079
00080
00081 bool IsSameColorSpace( PhotometricInterpretation const &pi ) const;
00082
00083
00084
00085 private:
00086 PIType PIField;
00087 };
00088
00089 inline std::ostream& operator<<(std::ostream& os, const PhotometricInterpretation &val)
00090 {
00091 const char *s = PhotometricInterpretation::GetPIString(val.PIField);
00092 os << (s ? s : "");
00093 return os;
00094 }
00095
00096
00097 }
00098
00099 #endif //GDCMPHOTOMETRICINTERPRETATION_H