float16Channel Class Reference

float16Channel Class Reference

#include <image.h>

Class Description

The data type for a 16 bit float image channel.

Definition at line 239 of file image.h.

Public Member Functions

 float16Channel (const float32Channel &d)
 
 float16Channel (const float16Channel &d)
 
 float16Channel (const uInt16Channel &d)
 
 float16Channel (const uInt8Channel &d)
 
 float16Channel (const half_ &d)
 
 float16Channel ()
 
float16Channeloperator= (const float32Channel &d)
 
float16Channeloperator= (const float16Channel &d)
 
float16Channeloperator= (const uInt16Channel &d)
 
float16Channeloperator= (const half_ &d)
 
float16Channeloperator= (const uInt8Channel &d)
 
 operator float () const
 
 operator half_ () const
 
 operator uInt16 () const
 
 operator uInt8 () const
 

Constructor & Destructor Documentation

float16Channel ( const float32Channel d)
inline

Definition at line 244 of file image.h.

244 { m_data = float(d); }
float16Channel ( const float16Channel d)
inline

Definition at line 245 of file image.h.

245 { m_data = float(d); }
float16Channel ( const uInt16Channel d)
inline

Definition at line 246 of file image.h.

246 { m_data = float(d); }
float16Channel ( const uInt8Channel d)
inline

Definition at line 247 of file image.h.

247 { m_data = float(d); }
float16Channel ( const half_ d)
inline

Definition at line 248 of file image.h.

248 { m_data = (d); }
float16Channel ( )
inline

Definition at line 249 of file image.h.

249 {}

Member Function Documentation

float16Channel& operator= ( const float32Channel d)
inline

Definition at line 251 of file image.h.

252  {
253  *this = float16Channel(d);
254  return *this;
255  }
float16Channel& operator= ( const float16Channel d)
inline

Definition at line 257 of file image.h.

258  {
259  *(uInt16 *)this = *(uInt16 *)&d;
260  return *this;
261  }
unsigned short uInt16
Definition: image.h:88
float16Channel& operator= ( const uInt16Channel d)
inline

Definition at line 263 of file image.h.

264  {
265  *this = float16Channel(d);
266  return *this;
267  }
float16Channel& operator= ( const half_ d)
inline

Definition at line 269 of file image.h.

270  {
271  *this = float16Channel(d);
272  return *this;
273  }
float16Channel& operator= ( const uInt8Channel d)
inline

Definition at line 275 of file image.h.

276  {
277  *this = float16Channel(d);
278  return *this;
279  }
operator float ( ) const
inline

Definition at line 281 of file image.h.

281 { return float(m_data); }
operator half_ ( ) const
inline

Definition at line 282 of file image.h.

282 { return m_data; }
operator uInt16 ( ) const
inline

Definition at line 284 of file image.h.

285  { float d = float(m_data);
286  if (d < 0.0f) return 0;
287  if (d > 1.0f) return 65535;
288  return uInt16(d * 65535.0f);
289  }
unsigned short uInt16
Definition: image.h:88
GLclampf f
Definition: GLee.h:9303
operator uInt8 ( ) const
inline

Definition at line 290 of file image.h.

291  { float d = float(m_data);
292  if (d < 0.0f) return 0;
293  if (d > 1.0f) return 255;
294  return uInt8(d * 255.0f);
295  }
unsigned char uInt8
Definition: image.h:87
GLclampf f
Definition: GLee.h:9303

The documentation for this class was generated from the following file: