HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CE_Image.h File Reference
#include "CE_API.h"
#include <UT/UT_NonCopyable.h>
#include <UT/UT_VectorTypes.h>
#include <UT/UT_VoxelArray.h>
#include <SYS/SYS_Inline.h>
#include <SYS/SYS_Types.h>
+ Include dependency graph for CE_Image.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CE_Image
 
struct  CE_StorageTypeTraits< STORAGE >
 Type traits for a given storage type... More...
 
struct  CE_StorageTypeTraits< CE_Image::FLOAT32 >
 
struct  CE_StorageTypeTraits< CE_Image::FLOAT16 >
 
struct  CE_StorageTypeTraits< CE_Image::INT32 >
 
struct  CE_StorageTypeTraits< CE_Image::INT16 >
 
struct  CE_StorageTypeTraits< CE_Image::INT8 >
 

Functions

template<typename T >
void CE_API CEfillVoxelArrayFromFlatStorage (UT_VoxelArray< T > &dest, const void *src, CE_Image::StorageType storage)
 
template<typename T >
void CE_API CEfillFlatStorageFromVoxelArray (void *dest, const UT_VoxelArray< T > &src, CE_Image::StorageType storage)
 

Function Documentation

template<typename T >
void CE_API CEfillFlatStorageFromVoxelArray ( void dest,
const UT_VoxelArray< T > &  src,
CE_Image::StorageType  storage 
)

This function can be used to convert a 2D voxel array of vectors, integers, or floats into a flat array of specified storage. The source array must have Z-resolution of 1. dest must be of size X_RES * Y_RES * TUPLE_SIZE_OF_T * BYTES_FOR_STORAGE and its final layout will be {layers of y-pixels: {layers of x-pixels: {comp0, comp1, ...}}} That is, every component of every pixel along the first row, followed by the second row, etc.

template<typename T >
void CE_API CEfillVoxelArrayFromFlatStorage ( UT_VoxelArray< T > &  dest,
const void src,
CE_Image::StorageType  storage 
)

This function can be used to convert a flat array (of specified storage) into a 2D voxel array of vectors, integers, or floats. The destination voxel array must have its size already initialized. src must be of size X_RES * Y_RES * TUPLE_SIZE_OF_T * BYTES_FOR_STORAGE and its layout must be {layers of x-pixels}, where each is {pixel data}, and each one of those is {component0, component1, ...} (every component's type is controlled by the storage specifier), everything tightly packed.