Cortex  10.0.0-a4
Public Member Functions | List of all members
IECore::ScaledDataConversion< F, T, Enable > Struct Template Reference

#include <ScaledDataConversion.h>

+ Inheritance diagram for IECore::ScaledDataConversion< F, T, Enable >:

Public Member Functions

operator() (F f) const
 
- Public Member Functions inherited from IECore::DataConversion< F, T >
operator() (F f) const
 
InverseType inverse () const
 

Additional Inherited Members

- Public Types inherited from IECore::DataConversion< F, T >
typedef F FromType
 
typedef T ToType
 
typedef void InverseType
 The type of the converter that can perform the inverse transformation.
 
typedef boost::false_type IsIdentity
 

Detailed Description

template<typename F, typename T, typename Enable = void>
struct IECore::ScaledDataConversion< F, T, Enable >

A DataConversion which converts one numeric type to another, maximising the use of the range of the target type. For example, converting a char value of 127 (half way through the range of the char type) to a short would yield a short value of 32767 (half way through the range of the short type). Care is taken when dealing with floating point types, which are assumed to have no practical "range". So, in the example above, a char value of 127 when converter to float, double, or half, would have a value of approximately 0.498 (127/255).

When conversion is attempted between a signed type and an unsigned type, appropriate clamping is performed.

This conversion is employed primarily in the ImageWriter-derived classes.


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