Fovia's C++ Client/Server API
Public Member Functions | Public Attributes | List of all members
COLORED_POINT Struct Reference

Public Member Functions

 COLORED_POINT (const COLORED_POINT &r)
 
COLORED_POINToperator= (const COLORED_POINT &r)
 

Public Attributes

signed int c
 
signed int c2
 
signed int lighting1
 
signed int lighting2
 
POINT pt
 
signed int y2
 

Detailed Description

This object represents a single control point on a transfer function.

Member Data Documentation

signed int COLORED_POINT::c

Color for this control point.

  • Red – lowest byte.
  • Green – 2nd byte.
  • Blue – 3rd byte.
  • 4th byte – Reserved for future use. Must be set to zero.

Referenced by RENDER_PARAMS::CombineWith().

signed int COLORED_POINT::c2

Color for alternate transfer function. If you have segmented the dataset using multi-TF segmentation, this value will represent the color for voxels that are set to TF 2.

  • Red – lowest byte.
  • Green – 2nd byte.
  • Blue – 3rd byte.
  • 4th byte – Reserved for future use. Must be set to zero.

Referenced by RENDER_PARAMS::CombineWith().

signed int COLORED_POINT::lighting1

Lighting value. 0 for lighitng on and 1 for lighting off.

Referenced by RENDER_PARAMS::CombineWith().

signed int COLORED_POINT::lighting2

Lighting value for alternate transfer function. 0 for lighitng on and 1 for lighting off. If you have segmented the dataset using multi-TF segmentation, this value will represent the lighting value for voxels that are set to TF 2.

Referenced by RENDER_PARAMS::CombineWith().

POINT COLORED_POINT::pt

Location of the point.

If RF_DONT_NORMALIZE_TF is set, the x is the actual scalar value of the volume data you are rendering. If RF_DONT_NORMALIZE_TF is not set, x is a value from 0-65535 representing a normalized range from 0% to 100% (0%=0 and 100%=65535).

The y value is a value from 0-4095 describing opacity. 0 is 0% opacity and 4095 is 100% opacity. 100% opacity means that over 1/16th of a volume unit (usually millimeters in CT), 100% of the ray energy will be absorbed. For example, if the opacity is 50% (2047) and the ray is traversing through a homogenous area of the value in this control point, then after 1/16th of a volume unit, 50% of the ray energy will remain and the rest will have been absorbed and accumulated as the color specified in c. After another 1/16gh of a volume unit, 25% ray energy will remain. Another 1/16th will leave 12.5%...and so on.

Due to the nature of how volumes absorb energy as you cast a ray into it (described in the previous paragraph), the relationship between perceived opacity and this opacity value is logarithmic. So, a very small opacity value will still result in a very visible object. In many cases, it is appropriate to expose this value to the end user more linearly by applying something like the following calculation:

$ linearY = \log_{2} y $

Referenced by RENDER_PARAMS::CombineWith().

signed int COLORED_POINT::y2

Opacity for alternate transfer function. If you have segmented the dataset using multi-TF segmentation, this value will represent the opacity for voxels that are set to TF 2.

Referenced by RENDER_PARAMS::CombineWith().