ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkTransferFunctionViewer Class Reference

Display a transfer function for editing. More...

#include <vtkTransferFunctionViewer.h>

Inheritance diagram for vtkTransferFunctionViewer:
Inheritance graph
[legend]
Collaboration diagram for vtkTransferFunctionViewer:
Collaboration graph
[legend]

List of all members.

Public Types

enum  EditorTypes { SIMPLE_1D = 0, SHAPES_1D, SHAPES_2D }

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetBorderWidth (int width)
void Render ()
void SetHistogram (vtkRectilinearGrid *histogram)
void SetRenderWindow (vtkRenderWindow *win)
void SetInteractor (vtkRenderWindowInteractor *win)
void SetHistogramVisibility (int visibility)
void SetShowColorFunctionInBackground (int visibility)
void SetShowColorFunctionInHistogram (int visibility)
void SetShowColorFunctionOnLines (int visibility)
void SetLinesColor (double r, double g, double b)
void SetColorElementsByColorFunction (int color)
void SetElementsColor (double r, double g, double b)
void SetAllowInteriorElements (int allow)
void SetColorSpace (int space)
void SetLockEndPoints (int lock)
void SetBackgroundColor (double r, double g, double b)
void SetBackgroundColor (double color[3])
void SetHistogramColor (double r, double g, double b)
void SetHistogramColor (double color[3])
void SetSize (int x, int y)
void SetSize (int size[2])
intGetSize ()
void SetTransferFunctionEditorType (int type)
void SetTransferFunctionEditorTypeToSimple1D ()
void SetTransferFunctionEditorTypeToShapes1D ()
void SetTransferFunctionEditorTypeToShapes2D ()
void SetModificationType (int type)
void SetModificationTypeToColor ()
void SetModificationTypeToOpacity ()
void SetModificationTypeToColorAndOpacity ()
void SetVisibleScalarRange (double range[2])
void SetVisibleScalarRange (double min, double max)
void GetVisibleScalarRange (double range[2])
doubleGetVisibleScalarRange ()
void SetWholeScalarRange (double range[2])
void SetWholeScalarRange (double min, double max)
void GetWholeScalarRange (double range[2])
doubleGetWholeScalarRange ()
virtual vtkRendererGetRenderer ()
virtual
vtkTransferFunctionEditorWidget
GetEditorWidget ()
virtual vtkRenderWindowInteractorGetInteractor ()
virtual vtkRenderWindowGetRenderWindow ()
void SetElementLighting (double ambient, double diffuse, double specular, double specularPower)
void SetOpacityFunction (vtkPiecewiseFunction *function)
vtkPiecewiseFunctionGetOpacityFunction ()
void SetColorFunction (vtkColorTransferFunction *function)
vtkColorTransferFunctionGetColorFunction ()
void SetElementOpacity (unsigned int idx, double opacity)
double GetElementOpacity (unsigned int idx)
void SetElementRGBColor (unsigned int idx, double r, double g, double b)
int GetElementRGBColor (unsigned int idx, double color[3])
void SetElementHSVColor (unsigned int idx, double h, double s, double v)
int GetElementHSVColor (unsigned int idx, double color[3])
void SetElementScalar (unsigned int idx, double scalar)
double GetElementScalar (unsigned int idx)
void SetCurrentElementId (unsigned int idx)
unsigned int GetCurrentElementId ()
void MoveToPreviousElement ()
void MoveToNextElement ()

Static Public Member Functions

static vtkTransferFunctionViewerNew ()
static int IsTypeOf (const char *type)
static vtkTransferFunctionViewerSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkTransferFunctionViewer ()
 ~vtkTransferFunctionViewer ()
virtual void InstallPipeline ()
virtual void UnInstallPipeline ()

Protected Attributes

vtkRenderWindowRenderWindow
vtkRendererRenderer
vtkRenderWindowInteractorInteractor
vtkInteractorStyleTransferFunctionEditorInteractorStyle
vtkTransferFunctionEditorWidgetEditorWidget
vtkEventForwarderCommandEventForwarder
vtkRectilinearGridHistogram

Detailed Description

Display a transfer function for editing.

vtkTransferFunctionViewer bundles together several classes (including a vtkRenderer and vtkRenderWindow) for displaying a transfer function editor. It invokes an InteractionEvent when the scalar range shown in the transfer function editor changes.

This viewer invokes the following events from vtkCommand: InteractionEvent - Lets you know the visible scalar range of the data has changed because of panning, zooming, or resetting to the whole scalar range. PickEvent - Lets you know a transfer function element has been left- clicked so you can display a color chooser to select a color for it. WidgetValueChangedEvent - Lets you know that a transfer function node has been moved. EndInteractionEvent - Lets you know the left mouse button has been released after moving a node. WidgetModifiedEvent - Lets you know that the active node has changed. PlacePointEvent - Lets you know a node has been added or deleted.

See also:
vtkTransferFunctionEditorWidget vtkTransferFunctionEditorRepresentation vtkInteractorStyleTransferFunctionEditor

Definition at line 56 of file vtkTransferFunctionViewer.h.


Member Enumeration Documentation

Enumerator:
SIMPLE_1D 
SHAPES_1D 
SHAPES_2D 

Definition at line 106 of file vtkTransferFunctionViewer.h.


Constructor & Destructor Documentation

vtkTransferFunctionViewer::vtkTransferFunctionViewer ( ) [protected]
vtkTransferFunctionViewer::~vtkTransferFunctionViewer ( ) [protected]

Member Function Documentation

static vtkTransferFunctionViewer* vtkTransferFunctionViewer::New ( ) [static]

Reimplemented from vtkObject.

virtual const char* vtkTransferFunctionViewer::GetClassName ( ) [virtual]

Reimplemented from vtkObject.

static int vtkTransferFunctionViewer::IsTypeOf ( const char *  type) [static]

Reimplemented from vtkObject.

virtual int vtkTransferFunctionViewer::IsA ( const char *  type) [virtual]

Reimplemented from vtkObject.

static vtkTransferFunctionViewer* vtkTransferFunctionViewer::SafeDownCast ( vtkObject o) [static]

Reimplemented from vtkObject.

void vtkTransferFunctionViewer::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkObject.

void vtkTransferFunctionViewer::SetBackgroundColor ( double  r,
double  g,
double  b 
)

Set the background color of the rendering window.

void vtkTransferFunctionViewer::SetBackgroundColor ( double  color[3]) [inline]

Set the background color of the rendering window.

Definition at line 66 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetHistogramColor ( double  r,
double  g,
double  b 
)

Set the color of the histogram. Set the transfer function editor type before setting the color of the histogram.

void vtkTransferFunctionViewer::SetHistogramColor ( double  color[3]) [inline]

Set the color of the histogram. Set the transfer function editor type before setting the color of the histogram.

Definition at line 74 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetSize ( int  x,
int  y 
)

Set/get the size of the rendering window.

void vtkTransferFunctionViewer::SetSize ( int  size[2]) [inline]

Set/get the size of the rendering window.

Definition at line 81 of file vtkTransferFunctionViewer.h.

int* vtkTransferFunctionViewer::GetSize ( )

Set/get the size of the rendering window.

void vtkTransferFunctionViewer::SetBorderWidth ( int  width)

Set the width (in pixels) of the border around the transfer function editor.

void vtkTransferFunctionViewer::Render ( )

Render the transfer function editor.

void vtkTransferFunctionViewer::SetTransferFunctionEditorType ( int  type)

Specify the type of transfer function editor to dipslay in this viewer.

void vtkTransferFunctionViewer::SetTransferFunctionEditorTypeToSimple1D ( ) [inline]

Specify the type of transfer function editor to dipslay in this viewer.

Definition at line 97 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetTransferFunctionEditorTypeToShapes1D ( ) [inline]

Specify the type of transfer function editor to dipslay in this viewer.

Definition at line 99 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetTransferFunctionEditorTypeToShapes2D ( ) [inline]

Specify the type of transfer function editor to dipslay in this viewer.

Definition at line 101 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetModificationType ( int  type)

Set the type of function to modify (color, opacity, or both). Set the editor type before setting the modification type.

void vtkTransferFunctionViewer::SetModificationTypeToColor ( )

Set the type of function to modify (color, opacity, or both). Set the editor type before setting the modification type.

void vtkTransferFunctionViewer::SetModificationTypeToOpacity ( )

Set the type of function to modify (color, opacity, or both). Set the editor type before setting the modification type.

void vtkTransferFunctionViewer::SetModificationTypeToColorAndOpacity ( )

Set the type of function to modify (color, opacity, or both). Set the editor type before setting the modification type.

void vtkTransferFunctionViewer::SetHistogram ( vtkRectilinearGrid histogram)

Set the histogram to display behind the transfer function editor. The X coordinates of this vtkRectilinearGrid give the scalar range for each bin of the histogram. There is a cell array containing the number of scalar values per bin. Set the editor type before setting the histogram.

void vtkTransferFunctionViewer::SetVisibleScalarRange ( double  range[2]) [inline]

Set the range of scalar values that will be shown in the rendering window. Set the type of transfer function editor to use before setting or getting the scalar range.

Definition at line 134 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetVisibleScalarRange ( double  min,
double  max 
)

Set the range of scalar values that will be shown in the rendering window. Set the type of transfer function editor to use before setting or getting the scalar range.

void vtkTransferFunctionViewer::GetVisibleScalarRange ( double  range[2])

Set the range of scalar values that will be shown in the rendering window. Set the type of transfer function editor to use before setting or getting the scalar range.

double* vtkTransferFunctionViewer::GetVisibleScalarRange ( )

Set the range of scalar values that will be shown in the rendering window. Set the type of transfer function editor to use before setting or getting the scalar range.

void vtkTransferFunctionViewer::SetWholeScalarRange ( double  range[2]) [inline]

Set the whole range of possible scalar values. This will be used for resetting the viewer to show the whole scalar range when the input is not set. Set the type of transfer function editor to use before setting or getting the scalar range.

Definition at line 146 of file vtkTransferFunctionViewer.h.

void vtkTransferFunctionViewer::SetWholeScalarRange ( double  min,
double  max 
)

Set the whole range of possible scalar values. This will be used for resetting the viewer to show the whole scalar range when the input is not set. Set the type of transfer function editor to use before setting or getting the scalar range.

void vtkTransferFunctionViewer::GetWholeScalarRange ( double  range[2])

Set the whole range of possible scalar values. This will be used for resetting the viewer to show the whole scalar range when the input is not set. Set the type of transfer function editor to use before setting or getting the scalar range.

double* vtkTransferFunctionViewer::GetWholeScalarRange ( )

Set the whole range of possible scalar values. This will be used for resetting the viewer to show the whole scalar range when the input is not set. Set the type of transfer function editor to use before setting or getting the scalar range.

virtual vtkRenderer* vtkTransferFunctionViewer::GetRenderer ( ) [virtual]

Provide access to some of the underlying VTK objects.

virtual vtkTransferFunctionEditorWidget* vtkTransferFunctionViewer::GetEditorWidget ( ) [virtual]

Provide access to some of the underlying VTK objects.

virtual vtkRenderWindowInteractor* vtkTransferFunctionViewer::GetInteractor ( ) [virtual]

Provide access to some of the underlying VTK objects.

virtual vtkRenderWindow* vtkTransferFunctionViewer::GetRenderWindow ( ) [virtual]

Provide access to some of the underlying VTK objects.

void vtkTransferFunctionViewer::SetRenderWindow ( vtkRenderWindow win)

Set the render window to be used in this viewer. One will be created automatically if you do not specify one.

void vtkTransferFunctionViewer::SetInteractor ( vtkRenderWindowInteractor win)

Set the render window to be used in this viewer. One will be created automatically if you do not specify one.

void vtkTransferFunctionViewer::SetHistogramVisibility ( int  visibility)

Determine whether a histogram will be displayed behind the transfer function editor.

void vtkTransferFunctionViewer::SetShowColorFunctionInBackground ( int  visibility)

Determine whether a gradient image showing the color function should be displayed in the background. Set the transfer function editor type before setting this value.

void vtkTransferFunctionViewer::SetShowColorFunctionInHistogram ( int  visibility)

Determine whether a gradient image showing the color function should be displayed in the histogram (if the histogram is visible). Set the transfer function editor type before setting this value.

void vtkTransferFunctionViewer::SetShowColorFunctionOnLines ( int  visibility)

Determine whether the color gradient should be displayed on the lines connecting the nodes of the transfer function editor. Set the transfer function editor type before setting this value.

void vtkTransferFunctionViewer::SetLinesColor ( double  r,
double  g,
double  b 
)

Specify the color in which to display the lines connecting the nodes if they are not displaying the color gradient. Set the transfer function editor type before calling this method.

void vtkTransferFunctionViewer::SetColorElementsByColorFunction ( int  color)

Specify whether the node color should be determined by the color transfer function. Set the transfer function editor type before setting this value.

void vtkTransferFunctionViewer::SetElementsColor ( double  r,
double  g,
double  b 
)

Set the color to use for nodes if not coloring them by the color transfer function. Set the transfer function editor type before calling this method.

void vtkTransferFunctionViewer::SetElementLighting ( double  ambient,
double  diffuse,
double  specular,
double  specularPower 
)

Specify the lighting parameters for the transfer function editor elements. Set the transfer function editor type before calling this method.

void vtkTransferFunctionViewer::SetOpacityFunction ( vtkPiecewiseFunction function)

Set/get the opacity function. Set the type of transfer function editor before trying to set or get the opacity function.

vtkPiecewiseFunction* vtkTransferFunctionViewer::GetOpacityFunction ( )

Set/get the opacity function. Set the type of transfer function editor before trying to set or get the opacity function.

void vtkTransferFunctionViewer::SetColorFunction ( vtkColorTransferFunction function)

Set/get the color function. Set the type of transfer function editor before trying to set or get the color function.

vtkColorTransferFunction* vtkTransferFunctionViewer::GetColorFunction ( )

Set/get the color function. Set the type of transfer function editor before trying to set or get the color function.

void vtkTransferFunctionViewer::SetAllowInteriorElements ( int  allow)

Toggle whether to allow interior nodes in the transfer function. Set the type of transfer function editor before trying to set this value.

void vtkTransferFunctionViewer::SetElementOpacity ( unsigned int  idx,
double  opacity 
)

Set/get the opacity of a particular transfer function element.

double vtkTransferFunctionViewer::GetElementOpacity ( unsigned int  idx)

Set/get the opacity of a particular transfer function element.

void vtkTransferFunctionViewer::SetElementRGBColor ( unsigned int  idx,
double  r,
double  g,
double  b 
)

Set/get the RGB color of a particular transfer function element.

int vtkTransferFunctionViewer::GetElementRGBColor ( unsigned int  idx,
double  color[3] 
)

Set/get the RGB color of a particular transfer function element.

void vtkTransferFunctionViewer::SetElementHSVColor ( unsigned int  idx,
double  h,
double  s,
double  v 
)

Set/get the HSV color of a particular transfer function element.

int vtkTransferFunctionViewer::GetElementHSVColor ( unsigned int  idx,
double  color[3] 
)

Set/get the HSV color of a particular transfer function element.

void vtkTransferFunctionViewer::SetElementScalar ( unsigned int  idx,
double  scalar 
)

Set/get the scalar value of a particular transfer function element.

double vtkTransferFunctionViewer::GetElementScalar ( unsigned int  idx)

Set/get the scalar value of a particular transfer function element.

void vtkTransferFunctionViewer::SetCurrentElementId ( unsigned int  idx)

Set/get the current element Id.

unsigned int vtkTransferFunctionViewer::GetCurrentElementId ( )

Set/get the current element Id.

void vtkTransferFunctionViewer::MoveToPreviousElement ( )

Move to the previous/next transfer function element.

void vtkTransferFunctionViewer::MoveToNextElement ( )

Move to the previous/next transfer function element.

void vtkTransferFunctionViewer::SetColorSpace ( int  space)

Set the color space. (RGB = 0, HSV = 1, HSV with wrapping = 2, CIELAB = 3, Diverging = 4)

void vtkTransferFunctionViewer::SetLockEndPoints ( int  lock)

Set whether the endpoint nodes may or may not change scalar values and/or be deleted. By default moving and deleting are allowed. Set the transfer function editor type before calling this method. It only has an effect on the simple 1D case.

virtual void vtkTransferFunctionViewer::InstallPipeline ( ) [protected, virtual]
virtual void vtkTransferFunctionViewer::UnInstallPipeline ( ) [protected, virtual]

Member Data Documentation

Definition at line 282 of file vtkTransferFunctionViewer.h.

Definition at line 283 of file vtkTransferFunctionViewer.h.

Definition at line 284 of file vtkTransferFunctionViewer.h.

Definition at line 285 of file vtkTransferFunctionViewer.h.

Definition at line 286 of file vtkTransferFunctionViewer.h.

Definition at line 287 of file vtkTransferFunctionViewer.h.

Definition at line 288 of file vtkTransferFunctionViewer.h.


The documentation for this class was generated from the following file: