Loading [MathJax]/extensions/tex2jax.js
Logo ROOT   6.12/07
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
glvox2.C File Reference

Detailed Description

This macro demonstrates how to use "glcol" option for TH3 and how to create user defined TRANSFER FUNCTION: transfer function maps bin value to voxel's opacity.

codomain is 0, 1 To pass transparency function into painting algorithm, you have to:

  1. Create TF1 object (with symbolic expression like "0.5 * (sin(x) + 1)":
    ...
    TF1 * tf = new TF1("TransferFunction", "0.5 * (sin(x) + 1)", -10., 10.);
    ...
    IMPORTANT, the name of TF1 object MUST be "TransferFunction".
  2. Add this function into a hist's list of functions:
    ...
    TList * lof = hist->GetListOfFunctions();
    if (lof) lof->Add(tf);
    ...
    It's also possible to use your own function and pass it into TF1, please read TF1 documentation to learn how.

This macro is to be compiled: TF1 is extremely slow with CINT's function as an argument.

Definition in file glvox2.C.