23#ifndef _SO_TRANSFER_FUNCTION_
24#define _SO_TRANSFER_FUNCTION_
28#include <Inventor/nodes/SoNode.h>
29#include <Inventor/nodes/SoTexture2.h>
30#include <Inventor/fields/SoSFEnum.h>
31#include <Inventor/fields/SoMFFloat.h>
32#include <Inventor/fields/SoSFInt32.h>
33#include <Inventor/fields/SoSFFloat.h>
34#include <Inventor/algorithms/SoConversion.h>
35#include <Inventor/SbVec.h>
37#include <Inventor/SbPImpl.h>
40#pragma warning( push )
41#pragma warning(disable:4251)
749 virtual void doAction(
SoAction *action );
770 MAP_TO_CENTER = SoConversion::MAP_TO_CENTER,
779 MAP_TO_BORDER = SoConversion::MAP_TO_BORDER
790 typedef float OpacityCorrectionFunction(
float alpha,
void* userData);
795 virtual void notify(SoNotList *list);
801 virtual bool affectsPath()
const;
803 static void initClass();
804 static void exitClass();
806 int getPackedColorMap(
unsigned int * &,
int);
807 static unsigned int getDefaultPackedColor(
unsigned int);
808 enum GLColorMapType {
810 TEX_FRAGMENT_PROGRAM = 2
813 GLColorMapType installColorMap(
SoState*,
int alphaUse);
818 GLColorMapType installColorMap(
SoState*,
int, OpacityCorrectionFunction* f,
void* userData);
825 void applyOpacityCorrection(
unsigned int* allRgba,
size_t numRgba,
826 OpacityCorrectionFunction* f,
void* userData);
831 SbBool isFullyTransparent(int64_t min, int64_t max,
int alphaUse = 0);
838 void getCMBuffer(
int alphaUse,
int nrgba,
unsigned int *rgba );
844 bool isTransparent(
const float min,
const float max,
const float materialTransparency)
const;
860 unsigned int getNumColors()
const;
865 bool isBinary()
const;
870 static void createPreIntegratedTexture(
SoState* state,
SoGroup* placeHolder);
875 size_t getNumComponents()
const;
881 int getTransferFunctionPosInTexture(
int maxTfId);
888 friend class SoVolumeState;
892#pragma warning( pop )
Class for smart character strings.
Abstract base class for all actions.
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Base class for all group nodes.
Multiple-value field containing any number of floating point values.
Abstract base class for all database nodes.
Abstract base class for picking objects in a scene.
Smart pointer for any class inheriting SoRefCounter.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a int32_t integer.
<a href="IconLegend.html"><img src="extLDM.gif" alt="Large Data Management" border="0"></a> Describe...
ColorMapType
Available color map type.
SoSFEnum colorMapType
ColorMap type (number of color components).
SoMFFloat actualColorMap
This field contains the actual color map used.
PredefColorMap
Predefined color maps.
@ VOLREN_GREEN
VolRenGreen (opacity ramp).
@ LABEL_256
256 labels (opaque).
@ TEMPERATURE
Temperature (opaque).
@ BLUE_WHITE_RED
Blue white red (opaque).
@ AIRWAY_SURFACES
Airway surfaces.
@ STANDARD
Standard (opaque).
@ INTENSITY
Intensity (opaque).
@ BLUE_RED
Blue red (opaque).
@ PHYSICS
Physics (opaque).
@ VOLREN_RED
VolRenRed (opacity ramp).
SoSFFloat fauxShadingLength
Controls how many color values will be affected by faux shading.
SoMFFloat colorMap
Array of floats in the range [0,1] defining a color map.
SbBool hasTransparency() const
Returns TRUE if the current color map contains alpha values less than 1.
SoSFFloat fauxShadingDarkenThreshold
Opacity threshold for darkening edges.
virtual SbBool loadColormap(const SbString &filename)
Loads a colormap from a file.
SoSFFloat fauxShadingStrength
Controls how much faux shading will darken the color values of the transfer function.
SoSFEnum predefColorMap
Predefined color map to use.
SoSFInt32 shift
Used for rescaling the input data values.
SoSFInt32 offset
Used for rescaling the input data values.
SoSFInt32 minValue
Remaps the defined color map between minValue and maxValue indices.
SoTransferFunction()
Constructor.
SoSFInt32 transferFunctionId
This field allows the use of multiple transfer functions.
SoSFInt32 maxValue
See minValue field.
Writes a scene graph to a file.