Added in API level 18
Deprecated in API level 31

ScriptIntrinsic3DLUT


public final class ScriptIntrinsic3DLUT
extends ScriptIntrinsic

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


This class was deprecated in API level 31.
Renderscript has been deprecated in API level 31. Please refer to the migration guide for the proposed alternatives.

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 Element.U8_4 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.

Inherited methods

Public methods

create

Added in API level 18
public static ScriptIntrinsic3DLUT create (RenderScript rs, 
                Element e)

Supported elements types are Element.U8_4 The defaults tables are identity.

Parameters
rs RenderScript: The RenderScript context

e Element: Element type for intputs and outputs

Returns
ScriptIntrinsic3DLUT ScriptIntrinsic3DLUT

forEach

Added in API level 18
public void forEach (Allocation ain, 
                Allocation aout)

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

Parameters
ain Allocation: Input allocation

aout Allocation: Output allocation

forEach

Added in API level 21
Deprecated in API level 31
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 Allocation: Input allocation

aout Allocation: Output allocation

opt Script.LaunchOptions: Launch options for kernel

getKernelID

Added in API level 18
public Script.KernelID getKernelID ()

Get a KernelID for this intrinsic kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

setLUT

Added in API level 18
public void setLUT (Allocation lut)

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

Parameters
lut Allocation