MATLAB Function Reference    
isocolors

Calculates isosurface and patch colors

Syntax

Description

nc = isocolors(X,Y,Z,C,vertices) computes the colors of isosurface (patch object) vertices (vertices) using color values C. Arrays X, Y, Z define the coordinates for the color data in C and must be monotonic vectors or 3-D plaid arrays (as if produced by meshgrid). The colors are returned in nc. C must be 3-D (index colors).

nc = isocolors(X,Y,Z,R,G,B,vertices) uses R, G, B as the red, green, and blue color arrays (truecolor).

nc = isocolors(C,vertices), nc = isocolors(R,G,B,vertices) assumes X, Y, and Z are determined by the expression:

where [m n p] = size(C).

nc = isocolors(...,PatchHandle) uses the vertices from the patch identified by PatchHandle.

isocolors(...,PatchHandle) sets the FaceVertexCData property of the patch specified by PatchHandle to the computed colors.

Examples

Indexed Color Data

This example displays an isosurface and colors it with random data using indexed color. (See Interpolating in Indexed Color vs. Truecolor for information on how patch objects interpret color data.)

Truecolor Data

This example displays an isosurface and colors it with truecolor (RGB) data.

Modified Truecolor Data

This example uses isocolors to calculate the truecolor data using the isosurface's (patch object's) vertices, but then returns the color data in a variable (c) in order to modify the values. It then explicitly sets the isosurface's FaceVertexCData to the new data (1-c).

See Also

isosurface, isocaps, smooth3, subvolume, reducevolume, reducepatch, isonormals.

Volume Visualization for related functions


  isocaps isonormals