- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions

# float16Channel Class Reference

This reference page is linked to from the following overview topics: Images.

Search for all occurrences

## Detailed Description

The data type for a 16 bit float image channel.

Definition at line 239 of file image.h.

`#include <image.h>`

List of all members.

## Public Member Functions
| float16Channel (const float32Channel &d)
| float16Channel (const float16Channel &d)
| float16Channel (const uInt16Channel &d)
| float16Channel (const uInt8Channel &d)
| float16Channel (const half_ &d)
| float16Channel ()
float16Channel & | operator= (const float32Channel &d)
float16Channel & | operator= (const float16Channel &d)
float16Channel & | operator= (const uInt16Channel &d)
float16Channel & | operator= (const half_ &d)
float16Channel & | operator= (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.

    { m_data = float(d); }

float16Channel | ( | const float16Channel & | d | ) | `[inline]`

Definition at line 245 of file image.h.

    { m_data = float(d); }

float16Channel | ( | const uInt16Channel & | d | ) | `[inline]`

Definition at line 246 of file image.h.

    { m_data = float(d); }

float16Channel | ( | const uInt8Channel & | d | ) | `[inline]`

Definition at line 247 of file image.h.

    { m_data = float(d); }

float16Channel | ( | const half_ & | d | ) | `[inline]`

Definition at line 248 of file image.h.

    { m_data = (d); }

float16Channel | ( |  | ) | `[inline]`

Definition at line 249 of file image.h.

    {}

## Member Function Documentation

float16Channel& operator= | ( | const float32Channel & | d | ) | `[inline]`

Definition at line 251 of file image.h.

        {
            *this = float16Channel(d);
            return *this;
        }

float16Channel& operator= | ( | const float16Channel & | d | ) | `[inline]`

Definition at line 257 of file image.h.

        {
            *(uInt16 *)this = *(uInt16 *)&d;
            return *this;
        }

float16Channel& operator= | ( | const uInt16Channel & | d | ) | `[inline]`

Definition at line 263 of file image.h.

        {
            *this = float16Channel(d);
            return *this;
        }

float16Channel& operator= | ( | const half_ & | d | ) | `[inline]`

Definition at line 269 of file image.h.

        {
            *this = float16Channel(d);
            return *this;
        }

float16Channel& operator= | ( | const uInt8Channel & | d | ) | `[inline]`

Definition at line 275 of file image.h.

        {
            *this = float16Channel(d);
            return *this;
        }

operator float | ( |  | ) | const `[inline]`

Definition at line 281 of file image.h.

    { return float(m_data); }

operator half_ | ( |  | ) | const `[inline]`

Definition at line 282 of file image.h.

    { return m_data; }

operator uInt16 | ( |  | ) | const `[inline]`

Definition at line 284 of file image.h.

            {   float d = float(m_data);
                if (d < 0.0f) return 0;
                if (d > 1.0f) return 65535;
                return uInt16(d * 65535.0f);
            }

operator uInt8 | ( |  | ) | const `[inline]`

Definition at line 290 of file image.h.

            {   float d = float(m_data);
                if (d < 0.0f) return 0;
                if (d > 1.0f) return 255;
                return uInt8(d * 255.0f);
            }

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

- Mudbox/image.h

float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel
float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel float16Channel