Creates a multidimensional table for use with vImage's multidimensional interpolated lookup functions.


func vImageMultidimensionalTable_Create(_ tableData: UnsafePointer<UInt16>, _ numSrcChannels: UInt32, _ numDestChannels: UInt32, _ table_entries_per_dimension: UnsafePointer<UInt8>, _ hint: vImageMDTableUsageHint, _ flags: vImage_Flags, _ err: UnsafeMutablePointer<vImage_Error>!) -> vImage_MultidimensionalTable!



A pointer to the data used to build the table.


The number of channels in an input pixel.


The number of channels in an output pixel.


An array containing the number of table entries for each dimension in numSrcChannels.


An indication of how the table is used. Pass either kvImageMDTableHint_16Q12 or kvImageMDTableHint_Float, or both. If only one hint is passed, vImage can save memory and time by omitting work to set up the table for unused formats.


The options to use when performing the operation. If you plan to perform your own tiling or use multithreading, pass kvImageDoNotTile.


A pointer to a vImage_Error. If err != NULL, on return, the memory pointed to by error is overwritten with an appropriate error or kvImageNoError. It's sufficient to simply check the function's return value against NULL to determine whether the function succeeded.

Return Value

kvImageNoError; otherwise, one of the error codes described in Data Types and Constants.


The input data is a contiguous array of N-dimensional samples which define the lookup table grid points. The samples have range [0,65535] interpreted as [0, 1.0f]. Note that, like with the Planar16U format, samples have an implicit divide by 65535.

See Also

Transforming with a Multidimensional Lookup Table