Fovia C++ In-Process API
Transfer Function Example

The code below shows how to specify a transfer function consisting of one render range. The render range has two points which specify the opacity and the corresponding color.

Transfer function assigns the opacity and color properties a range of values in the volume data.

ZEROMEMORY(rp);
rp.cbSize = sizeof(rp);
rp.RenderRanges[0].iPnt = 2;
rp.RenderRanges[0].aPnt[0].pt.x = 1220;
rp.RenderRanges[0].aPnt[0].pt.y = 512;
rp.RenderRanges[0].aPnt[0].c = HDRC_RGB(248, 180, 128);
rp.RenderRanges[0].aPnt[1].pt.x = 3500;
rp.RenderRanges[0].aPnt[1].pt.y = 4000;
rp.RenderRanges[0].aPnt[1].c = HDRC_RGB(250, 250, 250);

The above code shall generate following transfer function:

tfe_hdvr_inproc.png