Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
vtkPVTransferFunction2D Class Reference

Defines a 2D transfer function for mapping to RGBA values for volume rendering. More...

#include <vtkPVTransferFunction2D.h>

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

Public Member Functions

virtual void Build ()
 Generate the transfer function image data. More...
 
std::vector< vtkSmartPointer< vtkPVTransferFunction2DBox > > GetBoxes ()
 Get the control boxes defined on the function. More...
 
void RemoveAllBoxes ()
 Remove all control boxes from the transfer function. More...
 
vtkImageDataGetFunction ()
 Get the 2D transfer function. More...
 
virtual void SetOutputDimensions (int, int)
 Set/Get the output dimensions of the image data that is the transfer function. More...
 
void SetOutputDimensions (int [2])
 Set/Get the output dimensions of the image data that is the transfer function. More...
 
virtual intGetOutputDimensions ()
 Set/Get the output dimensions of the image data that is the transfer function. More...
 
virtual void GetOutputDimensions (int &, int &)
 Set/Get the output dimensions of the image data that is the transfer function. More...
 
virtual void GetOutputDimensions (int [2])
 Set/Get the output dimensions of the image data that is the transfer function. More...
 
int AddControlBox (double x, double y, double width, double height, double r, double g, double b, double a)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int AddControlBox (double x, double y, double width, double height, double *color)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int AddControlBox (vtkRectd &box, double *color)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int AddControlBox (vtkSmartPointer< vtkPVTransferFunction2DBox > box)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int SetControlBox (int id, vtkSmartPointer< vtkPVTransferFunction2DBox > box)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int RemoveControlBox (int id)
 Add/Remove a control box to/from the 2D transfer function. More...
 
int RemoveControlBox (vtkSmartPointer< vtkPVTransferFunction2DBox > box)
 Add/Remove a control box to/from the 2D transfer function. More...
 
virtual void SetRange (double, double, double, double)
 Set/Get the range of the function. More...
 
virtual void SetRange (double [4])
 Set/Get the range of the function. More...
 
virtual doubleGetRange ()
 Set/Get the range of the function. More...
 
virtual void GetRange (double &, double &, double &, double &)
 Set/Get the range of the function. More...
 
virtual void GetRange (double [4])
 Set/Get the range of the function. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkPVTransferFunction2DNew ()
 Instantiate the class. More...
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 
static vtkObjectBaseNew ()
 

Protected Member Functions

 vtkPVTransferFunction2D ()
 
 ~vtkPVTransferFunction2D () override
 
bool UpdateRange ()
 Update the range of the function. More...
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Protected Attributes

double Range [4] = { 0, 0, 0, 0 }
 The range for the X and Y axes of the function. More...
 
int OutputDimensions [2] = { 10, 10 }
 The output dimensions for the transfer function. More...
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 
typedef vtkObject Superclass
 Standard methods for the VTK class. More...
 
static int IsTypeOf (const char *type)
 Standard methods for the VTK class. More...
 
static vtkPVTransferFunction2DSafeDownCast (vtkObject *o)
 Standard methods for the VTK class. More...
 
virtual const char * GetClassName ()
 Standard methods for the VTK class. More...
 
virtual int IsA (const char *type)
 Standard methods for the VTK class. More...
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Standard methods for the VTK class. More...
 

Detailed Description

Defines a 2D transfer function for mapping to RGBA values for volume rendering.

vtkPVTransferFunction2D is a color mapping in RGBA space that uses 2D functions to allow interpolation along both the X and Y axes of the function.

Definition at line 27 of file vtkPVTransferFunction2D.h.

Member Typedef Documentation

◆ Superclass

Standard methods for the VTK class.

Definition at line 39 of file vtkPVTransferFunction2D.h.

Constructor & Destructor Documentation

◆ vtkPVTransferFunction2D()

vtkPVTransferFunction2D::vtkPVTransferFunction2D ( )
protected

◆ ~vtkPVTransferFunction2D()

vtkPVTransferFunction2D::~vtkPVTransferFunction2D ( )
overrideprotected

Member Function Documentation

◆ New()

static vtkPVTransferFunction2D* vtkPVTransferFunction2D::New ( )
static

Instantiate the class.

◆ GetClassName()

virtual const char* vtkPVTransferFunction2D::GetClassName ( )
virtual

Standard methods for the VTK class.

◆ IsTypeOf()

static int vtkPVTransferFunction2D::IsTypeOf ( const char *  type)
static

Standard methods for the VTK class.

◆ IsA()

virtual int vtkPVTransferFunction2D::IsA ( const char *  type)
virtual

Standard methods for the VTK class.

Reimplemented from vtkObjectBase.

◆ SafeDownCast()

static vtkPVTransferFunction2D* vtkPVTransferFunction2D::SafeDownCast ( vtkObject o)
static

Standard methods for the VTK class.

◆ PrintSelf()

void vtkPVTransferFunction2D::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Standard methods for the VTK class.

Reimplemented from vtkObject.

◆ Build()

virtual void vtkPVTransferFunction2D::Build ( )
virtual

Generate the transfer function image data.

◆ SetOutputDimensions() [1/2]

virtual void vtkPVTransferFunction2D::SetOutputDimensions ( int  ,
int   
)
virtual

Set/Get the output dimensions of the image data that is the transfer function.

By default, this is (10, 10).

◆ SetOutputDimensions() [2/2]

void vtkPVTransferFunction2D::SetOutputDimensions ( int  [2])

Set/Get the output dimensions of the image data that is the transfer function.

By default, this is (10, 10).

◆ GetOutputDimensions() [1/3]

virtual int* vtkPVTransferFunction2D::GetOutputDimensions ( )
virtual

Set/Get the output dimensions of the image data that is the transfer function.

By default, this is (10, 10).

◆ GetOutputDimensions() [2/3]

virtual void vtkPVTransferFunction2D::GetOutputDimensions ( int ,
int  
)
virtual

Set/Get the output dimensions of the image data that is the transfer function.

By default, this is (10, 10).

◆ GetOutputDimensions() [3/3]

virtual void vtkPVTransferFunction2D::GetOutputDimensions ( int  [2])
virtual

Set/Get the output dimensions of the image data that is the transfer function.

By default, this is (10, 10).

◆ AddControlBox() [1/4]

int vtkPVTransferFunction2D::AddControlBox ( double  x,
double  y,
double  width,
double  height,
double  r,
double  g,
double  b,
double  a 
)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ AddControlBox() [2/4]

int vtkPVTransferFunction2D::AddControlBox ( double  x,
double  y,
double  width,
double  height,
double color 
)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ AddControlBox() [3/4]

int vtkPVTransferFunction2D::AddControlBox ( vtkRectd box,
double color 
)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ AddControlBox() [4/4]

int vtkPVTransferFunction2D::AddControlBox ( vtkSmartPointer< vtkPVTransferFunction2DBox box)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ SetControlBox()

int vtkPVTransferFunction2D::SetControlBox ( int  id,
vtkSmartPointer< vtkPVTransferFunction2DBox box 
)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ RemoveControlBox() [1/2]

int vtkPVTransferFunction2D::RemoveControlBox ( int  id)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ RemoveControlBox() [2/2]

int vtkPVTransferFunction2D::RemoveControlBox ( vtkSmartPointer< vtkPVTransferFunction2DBox box)

Add/Remove a control box to/from the 2D transfer function.

Returns the index of the added box or -1 on error.

Note
This function does not check to see if the box already exists in the function before adding it. Adding an existing box would add a duplicate control to the transfer function.

◆ GetBoxes()

std::vector<vtkSmartPointer<vtkPVTransferFunction2DBox> > vtkPVTransferFunction2D::GetBoxes ( )

Get the control boxes defined on the function.

◆ RemoveAllBoxes()

void vtkPVTransferFunction2D::RemoveAllBoxes ( )

Remove all control boxes from the transfer function.

◆ SetRange() [1/2]

virtual void vtkPVTransferFunction2D::SetRange ( double  ,
double  ,
double  ,
double   
)
virtual

Set/Get the range of the function.

Set/Get the (minX, maxX, minY, maxY) for the 2D transfer function.

◆ SetRange() [2/2]

virtual void vtkPVTransferFunction2D::SetRange ( double  [4])
virtual

Set/Get the range of the function.

Set/Get the (minX, maxX, minY, maxY) for the 2D transfer function.

◆ GetRange() [1/3]

virtual double* vtkPVTransferFunction2D::GetRange ( )
virtual

Set/Get the range of the function.

Set/Get the (minX, maxX, minY, maxY) for the 2D transfer function.

◆ GetRange() [2/3]

virtual void vtkPVTransferFunction2D::GetRange ( double ,
double ,
double ,
double  
)
virtual

Set/Get the range of the function.

Set/Get the (minX, maxX, minY, maxY) for the 2D transfer function.

◆ GetRange() [3/3]

virtual void vtkPVTransferFunction2D::GetRange ( double  [4])
virtual

Set/Get the range of the function.

Set/Get the (minX, maxX, minY, maxY) for the 2D transfer function.

◆ GetFunction()

vtkImageData* vtkPVTransferFunction2D::GetFunction ( )

Get the 2D transfer function.

◆ UpdateRange()

bool vtkPVTransferFunction2D::UpdateRange ( )
protected

Update the range of the function.

Returns true if the range changes. If the range has changed, calls Modified(). If UseCustomRange is set, this is a no-op.

Member Data Documentation

◆ Range

double vtkPVTransferFunction2D::Range[4] = { 0, 0, 0, 0 }
protected

The range for the X and Y axes of the function.

This will determine the bounds of the transfer function.

Definition at line 108 of file vtkPVTransferFunction2D.h.

◆ OutputDimensions

int vtkPVTransferFunction2D::OutputDimensions[2] = { 10, 10 }
protected

The output dimensions for the transfer function.

Definition at line 113 of file vtkPVTransferFunction2D.h.


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