34 #include "Core/include/private/DMultichannelTypes.hpp"
43 typedef MultichannelType<UINT8,3> COLOR_UINT8_3;
44 typedef MultichannelArray<UINT8,3> COLOR_UINT8_3_Array;
59 static inline size_t cardinal() {
return 256*256*256; }
60 static inline lineType createLine(
size_t lineLen)
63 arr.createArrays(lineLen);
66 static inline void deleteLine(
lineType arr)
70 static inline unsigned long ptrOffset(
lineType p,
unsigned long n=SIMD_VEC_SIZE) {
return (
size_t(p.arrays[0])) & (n-1); }
75 for (UINT i=0;i<2;i++)
76 str <<
double(val[i]) <<
",";
77 str << double(val[2]) <<
")";
100 r(c[0]), g(c[1]), b(c[2])
106 r(c[0]), g(c[1]), b(c[2])
109 RGB(
int _r,
int _g,
int _b)
111 r(c[0]), g(c[1]), b(c[2])
116 r(c[0]), g(c[1]), b(c[2])
121 r(c[0]), g(c[1]), b(c[2])
125 RGB& operator =(
const RGB &rhs)
127 for (UINT i=0;i<3;i++)
131 void printSelf(ostream &os = std::cout,
string =
"")
const
133 os <<
"(" << double(c[0]) <<
"," << double(c[1]) <<
"," << double(c[2]) <<
")";
147 static inline size_t cardinal() {
return 256*256*256; }
151 inline const char *getDataTypeAsString(
RGB *) {
return "RGB"; }
155 typedef MultichannelType<UINT8,4> COLOR_32;
156 typedef MultichannelArray<UINT8,4> COLOR_32_Array;
168 static inline lineType createLine(
size_t lineLen)
171 arr.createArrays(lineLen);
174 static inline void deleteLine(
lineType arr)
178 static inline unsigned long ptrOffset(
lineType p,
unsigned long n=SIMD_VEC_SIZE) {
return (
size_t(p.arrays[0])) & (n-1); }
179 static inline std::string toString(
const COLOR_32 &val)
182 for (UINT i=0;i<3;i++)
183 str <<
double(val[i]) <<
", ";
184 str << double(val[3]);
Definition: DMultichannelTypes.hpp:388
Definition: DMultichannelTypes.hpp:51
Definition: DTypes.hpp:88