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

renders a slice of vtkImageData by loading the slice as a texture and then applying it to a quad. More...

#include <vtkTexturePainter.h>

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

List of all members.

Public Types

enum  { YZ_PLANE = 0, XZ_PLANE = 1, XY_PLANE = 2 }

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetLookupTable (vtkScalarsToColors *)
virtual void ReleaseGraphicsResources (vtkWindow *)
virtual void SetWholeExtent (int, int, int, int, int, int)
virtual void SetWholeExtent (int[6])
virtual void SetSlice (int)
virtual int GetSlice ()
virtual void SetSliceMode (int)
virtual int GetSliceMode ()
virtual void SetMapScalars (int)
virtual int GetMapScalars ()

Static Public Member Functions

static vtkTexturePainterNew ()
static int IsTypeOf (const char *type)
static vtkTexturePainterSafeDownCast (vtkObject *o)
static vtkInformationIntegerKeySLICE ()
static vtkInformationIntegerKeySLICE_MODE ()
static vtkInformationIntegerKeyMAP_SCALARS ()
static
vtkInformationObjectBaseKey
LOOKUP_TABLE ()

Protected Member Functions

 vtkTexturePainter ()
 ~vtkTexturePainter ()
virtual void ProcessInformation (vtkInformation *)
int SetupScalars (vtkImageData *input)
virtual void RenderInternal (vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)

Protected Attributes

int Slice
int SliceMode
int MapScalars
int ScalarMode
int ScalarArrayIndex
int UseXYPlane
int WholeExtent [6]
char * ScalarArrayName
vtkScalarsToColorsLookupTable
float QuadPoints [4][3]
vtkTextureTexture
vtkTimeStamp UpdateTime
static vtkInformationIntegerKeySCALAR_MODE ()
virtual void SetScalarMode (int)
virtual int GetScalarMode ()
static vtkInformationStringKeySCALAR_ARRAY_NAME ()
virtual void SetScalarArrayName (const char *)
virtual char * GetScalarArrayName ()
static vtkInformationIntegerKeySCALAR_ARRAY_INDEX ()
virtual void SetScalarArrayIndex (int)
virtual int GetScalarArrayIndex ()
static vtkInformationIntegerKeyUSE_XY_PLANE ()
virtual void SetUseXYPlane (int)
virtual void UseXYPlaneOn ()
virtual void UseXYPlaneOff ()
virtual int GetUseXYPlane ()

Detailed Description

renders a slice of vtkImageData by loading the slice as a texture and then applying it to a quad.

vtkTexturePainter is a painter for vtkImageData. It can render a slice of image data by loading it as an texture and then displaying it on a quad. It uses the bounds of the slice to position the quad. Unlike other image data algorithms, this painter provides API to choose the scalars to upload. If cell data is used, then cell centers are used to position the slice.

Definition at line 38 of file vtkTexturePainter.h.


Member Enumeration Documentation

anonymous enum
Enumerator:
YZ_PLANE 
XZ_PLANE 
XY_PLANE 

Definition at line 130 of file vtkTexturePainter.h.


Constructor & Destructor Documentation

vtkTexturePainter::vtkTexturePainter ( ) [protected]
vtkTexturePainter::~vtkTexturePainter ( ) [protected]

Member Function Documentation

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

Reimplemented from vtkPainter.

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

Reimplemented from vtkPainter.

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

Reimplemented from vtkPainter.

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

Reimplemented from vtkPainter.

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

Reimplemented from vtkPainter.

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

Reimplemented from vtkPainter.

static vtkInformationIntegerKey* vtkTexturePainter::SLICE ( ) [static]

Specify the X, Y or Z slice to use. The slice mode dictates how the data is slicde.

static vtkInformationIntegerKey* vtkTexturePainter::SLICE_MODE ( ) [static]

Specify how the slices are obtained.

static vtkInformationIntegerKey* vtkTexturePainter::MAP_SCALARS ( ) [static]

Turn on/off the mapping of color scalars through the lookup table. The default is Off. If Off, unsigned char scalars will be used directly as texture. If On, scalars will be mapped through the lookup table to generate 4-component unsigned char scalars. This ivar does not affect other scalars like unsigned short, float, etc. These scalars are always mapped through lookup tables. Look at vtkTexture::MapColorScalarsThroughLookupTable for more details.

static vtkInformationObjectBaseKey* vtkTexturePainter::LOOKUP_TABLE ( ) [static]

Set the lookuptable to use for scalar mapping. If none is specified and the scalars are not unsigned char scalars, then a default lookup table will be created and used.

static vtkInformationIntegerKey* vtkTexturePainter::SCALAR_MODE ( ) [static]

Determines the whether the scalars are to be obtained from point data or cell data. Look at the documentation for ScalarMode in vtkMapper for the different possible values and their effect.

virtual void vtkTexturePainter::SetScalarMode ( int  ) [virtual]

Determines the whether the scalars are to be obtained from point data or cell data. Look at the documentation for ScalarMode in vtkMapper for the different possible values and their effect.

virtual int vtkTexturePainter::GetScalarMode ( ) [virtual]

Determines the whether the scalars are to be obtained from point data or cell data. Look at the documentation for ScalarMode in vtkMapper for the different possible values and their effect.

static vtkInformationStringKey* vtkTexturePainter::SCALAR_ARRAY_NAME ( ) [static]

These three keys help identify the scalar array. If SCALAR_ARRAY_NAME is absent or NULL, SCALAR_ARRAY_INDEX is used. NOTE: We are deliberately not adding support to select a component to color with. That is now a property of the lookup table and ideally must be set on the lookup table.

virtual void vtkTexturePainter::SetScalarArrayName ( const char *  ) [virtual]

These three keys help identify the scalar array. If SCALAR_ARRAY_NAME is absent or NULL, SCALAR_ARRAY_INDEX is used. NOTE: We are deliberately not adding support to select a component to color with. That is now a property of the lookup table and ideally must be set on the lookup table.

virtual char* vtkTexturePainter::GetScalarArrayName ( ) [virtual]

These three keys help identify the scalar array. If SCALAR_ARRAY_NAME is absent or NULL, SCALAR_ARRAY_INDEX is used. NOTE: We are deliberately not adding support to select a component to color with. That is now a property of the lookup table and ideally must be set on the lookup table.

static vtkInformationIntegerKey* vtkTexturePainter::SCALAR_ARRAY_INDEX ( ) [static]

Sepecify the index of the array to color with when scalar array name is absent or null.

virtual void vtkTexturePainter::SetScalarArrayIndex ( int  ) [virtual]

Sepecify the index of the array to color with when scalar array name is absent or null.

virtual int vtkTexturePainter::GetScalarArrayIndex ( ) [virtual]

Sepecify the index of the array to color with when scalar array name is absent or null.

virtual void vtkTexturePainter::SetSlice ( int  ) [virtual]

Get/Set the Slice that needs to be rendering. This is applicable for 3D images. If the Slice number is not valid, then the 0th slice is rendered.

virtual int vtkTexturePainter::GetSlice ( ) [virtual]

Get/Set the Slice that needs to be rendering. This is applicable for 3D images. If the Slice number is not valid, then the 0th slice is rendered.

virtual void vtkTexturePainter::SetSliceMode ( int  ) [virtual]

Indicates the direction in which the slices are made into 3D data. If the input image is 2D, the the entire data is shown.

virtual int vtkTexturePainter::GetSliceMode ( ) [virtual]

Indicates the direction in which the slices are made into 3D data. If the input image is 2D, the the entire data is shown.

void vtkTexturePainter::SetLookupTable ( vtkScalarsToColors )

Set the lookuptable to use.

virtual void vtkTexturePainter::SetMapScalars ( int  ) [virtual]

Set if LUT must be used when scalars in the image can be directly used as colors. Look at vtkTexture::MapColorScalarsThroughLookupTable for more details.

virtual int vtkTexturePainter::GetMapScalars ( ) [virtual]

Set if LUT must be used when scalars in the image can be directly used as colors. Look at vtkTexture::MapColorScalarsThroughLookupTable for more details.

static vtkInformationIntegerKey* vtkTexturePainter::USE_XY_PLANE ( ) [static]

When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. Default if Off.

virtual void vtkTexturePainter::SetUseXYPlane ( int  ) [virtual]

When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. Default if Off.

virtual void vtkTexturePainter::UseXYPlaneOn ( ) [virtual]

When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. Default if Off.

virtual void vtkTexturePainter::UseXYPlaneOff ( ) [virtual]

When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. Default if Off.

virtual int vtkTexturePainter::GetUseXYPlane ( ) [virtual]

When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. Default if Off.

virtual void vtkTexturePainter::ReleaseGraphicsResources ( vtkWindow ) [virtual]

Reimplemented from vtkPainter.

virtual void vtkTexturePainter::SetWholeExtent ( int  ,
int  ,
int  ,
int  ,
int  ,
int   
) [virtual]
virtual void vtkTexturePainter::SetWholeExtent ( int  [6]) [virtual]
virtual void vtkTexturePainter::ProcessInformation ( vtkInformation ) [protected, virtual]

Called before RenderInternal() if the Information has been changed since the last time this method was called.

Reimplemented from vtkPainter.

virtual void vtkTexturePainter::RenderInternal ( vtkRenderer renderer,
vtkActor actor,
unsigned long  typeflags,
bool  forceCompileOnly 
) [protected, virtual]

Performs the actual rendering. Subclasses may override this method. default implementation merely call a Render on the DelegatePainter, if any. When RenderInternal() is called, it is assured that the DelegatePainter is in sync with this painter i.e. UpdateDelegatePainter() has been called.

Reimplemented from vtkPainter.

int vtkTexturePainter::SetupScalars ( vtkImageData input) [protected]

Internal method passes correct scalars to the Texture and returns 1 if cell scalars are used else 0.


Member Data Documentation

Definition at line 167 of file vtkTexturePainter.h.

Definition at line 168 of file vtkTexturePainter.h.

Definition at line 169 of file vtkTexturePainter.h.

Definition at line 170 of file vtkTexturePainter.h.

Definition at line 171 of file vtkTexturePainter.h.

Definition at line 172 of file vtkTexturePainter.h.

Definition at line 173 of file vtkTexturePainter.h.

Definition at line 174 of file vtkTexturePainter.h.

Definition at line 175 of file vtkTexturePainter.h.

Definition at line 179 of file vtkTexturePainter.h.

Definition at line 182 of file vtkTexturePainter.h.

Definition at line 184 of file vtkTexturePainter.h.


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