Android APIs
public final class

ScriptIntrinsic3DLUT

extends ScriptIntrinsic
java.lang.Object
   ↳ android.renderscript.BaseObj
     ↳ android.renderscript.Script
       ↳ android.renderscript.ScriptIntrinsic
         ↳ android.renderscript.ScriptIntrinsic3DLUT

Class Overview

Intrinsic for converting RGB to RGBA by using a 3D lookup table. The incoming r,g,b values are use as normalized x,y,z coordinates into a 3D allocation. The 8 nearest values are sampled and linearly interpolated. The result is placed in the output.

Summary

Public Methods
static ScriptIntrinsic3DLUT create(RenderScript rs, Element e)
Supported elements types are U8_4(RenderScript) The defaults tables are identity.
void forEach(Allocation ain, Allocation aout)
Invoke the kernel and apply the lookup to each cell of ain and copy to aout.
void forEach(Allocation ain, Allocation aout, Script.LaunchOptions opt)
Invoke the kernel and apply the lookup to each cell of ain and copy to aout.
Script.KernelID getKernelID()
Get a KernelID for this intrinsic kernel.
void setLUT(Allocation lut)
Sets the Allocation to be used as the lookup table.
[Expand]
Inherited Methods
From class android.renderscript.Script
From class android.renderscript.BaseObj
From class java.lang.Object

Public Methods

public static ScriptIntrinsic3DLUT create (RenderScript rs, Element e)

Added in API level 18

Supported elements types are U8_4(RenderScript) The defaults tables are identity.

Parameters
rs The RenderScript context
e Element type for intputs and outputs
Returns
  • ScriptIntrinsic3DLUT

public void forEach (Allocation ain, Allocation aout)

Added in API level 18

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

Parameters
ain Input allocation
aout Output allocation

public void forEach (Allocation ain, Allocation aout, Script.LaunchOptions opt)

Invoke the kernel and apply the lookup to each cell of ain and copy to aout.

Parameters
ain Input allocation
aout Output allocation
opt Launch options for kernel

public Script.KernelID getKernelID ()

Added in API level 18

Get a KernelID for this intrinsic kernel.

Returns
  • Script.KernelID The KernelID object.

public void setLUT (Allocation lut)

Added in API level 18

Sets the Allocation to be used as the lookup table. The lookup table must use the same Element as the intrinsic.