ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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>

Inherits vtkPainter.

Public Types

enum  { YZ_PLANE = 0, XZ_PLANE = 1, XY_PLANE = 2 }
 
typedef vtkPainter Superclass
 

Public Member Functions

virtual const char * GetClassName ()
 
virtual int IsA (const char *type)
 
void PrintSelf (ostream &os, vtkIndent indent)
 
void SetLookupTable (vtkScalarsToColors *)
 Set the lookuptable to use. More...
 
virtual void ReleaseGraphicsResources (vtkWindow *)
 
virtual void SetWholeExtent (int, int, int, int, int, int)
 
virtual void SetWholeExtent (int [6])
 
virtual void SetSlice (int)
 Get/Set the Slice that needs to be rendering. More...
 
virtual int GetSlice ()
 Get/Set the Slice that needs to be rendering. More...
 
virtual void SetSliceMode (int)
 Indicates the direction in which the slices are made into 3D data. More...
 
virtual int GetSliceMode ()
 Indicates the direction in which the slices are made into 3D data. More...
 
virtual void SetMapScalars (int)
 Set if LUT must be used when scalars in the image can be directly used as colors. More...
 
virtual int GetMapScalars ()
 Set if LUT must be used when scalars in the image can be directly used as colors. More...
 

Static Public Member Functions

static vtkTexturePainterNew ()
 
static int IsTypeOf (const char *type)
 
static vtkTexturePainterSafeDownCast (vtkObject *o)
 
static vtkInformationIntegerKey * SLICE ()
 Specify the X, Y or Z slice to use. More...
 
static vtkInformationIntegerKey * SLICE_MODE ()
 Specify how the slices are obtained. More...
 
static vtkInformationIntegerKey * MAP_SCALARS ()
 Turn on/off the mapping of color scalars through the lookup table. More...
 
static vtkInformationObjectBaseKey * LOOKUP_TABLE ()
 Set the lookuptable to use for scalar mapping. More...
 

Protected Member Functions

 vtkTexturePainter ()
 
 ~vtkTexturePainter ()
 
virtual void ProcessInformation (vtkInformation *)
 Called before RenderInternal() if the Information has been changed since the last time this method was called. More...
 
virtual void RenderInternal (vtkRenderer *renderer, vtkActor *actor, unsigned long typeflags, bool forceCompileOnly)
 Performs the actual rendering. More...
 
int SetupScalars (vtkImageData *input)
 Internal method passes correct scalars to the Texture and returns 1 if cell scalars are used else 0. More...
 

Protected Attributes

int Slice
 
int SliceMode
 
int MapScalars
 
int ScalarMode
 
int ScalarArrayIndex
 
int UseXYPlane
 
int WholeExtent [6]
 
char * ScalarArrayName
 
vtkScalarsToColors * LookupTable
 
float QuadPoints [4][3]
 
vtkTexture * Texture
 
vtkTimeStamp UpdateTime
 
static vtkInformationIntegerKey * SCALAR_MODE ()
 Determines the whether the scalars are to be obtained from point data or cell data. More...
 
virtual void SetScalarMode (int)
 Determines the whether the scalars are to be obtained from point data or cell data. More...
 
virtual int GetScalarMode ()
 Determines the whether the scalars are to be obtained from point data or cell data. More...
 
static vtkInformationStringKey * SCALAR_ARRAY_NAME ()
 These three keys help identify the scalar array. More...
 
virtual void SetScalarArrayName (const char *)
 These three keys help identify the scalar array. More...
 
virtual char * GetScalarArrayName ()
 These three keys help identify the scalar array. More...
 
static vtkInformationIntegerKey * SCALAR_ARRAY_INDEX ()
 Sepecify the index of the array to color with when scalar array name is absent or null. More...
 
virtual void SetScalarArrayIndex (int)
 Sepecify the index of the array to color with when scalar array name is absent or null. More...
 
virtual int GetScalarArrayIndex ()
 Sepecify the index of the array to color with when scalar array name is absent or null. More...
 
static vtkInformationIntegerKey * USE_XY_PLANE ()
 When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. More...
 
virtual void SetUseXYPlane (int)
 When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. More...
 
virtual void UseXYPlaneOn ()
 When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. More...
 
virtual void UseXYPlaneOff ()
 When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. More...
 
virtual int GetUseXYPlane ()
 When set, the image slice is always rendered in the XY plane (Z==0) irrespective of the image bounds. More...
 

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 40 of file vtkTexturePainter.h.

Member Typedef Documentation

§ Superclass

typedef vtkPainter vtkTexturePainter::Superclass

Definition at line 44 of file vtkTexturePainter.h.

Member Enumeration Documentation

§ anonymous enum

anonymous enum
Enumerator
YZ_PLANE 
XZ_PLANE 
XY_PLANE 

Definition at line 156 of file vtkTexturePainter.h.

Constructor & Destructor Documentation

§ vtkTexturePainter()

vtkTexturePainter::vtkTexturePainter ( )
protected

§ ~vtkTexturePainter()

vtkTexturePainter::~vtkTexturePainter ( )
protected

Member Function Documentation

§ New()

static vtkTexturePainter* vtkTexturePainter::New ( )
static

§ GetClassName()

virtual const char* vtkTexturePainter::GetClassName ( )
virtual

§ IsTypeOf()

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

§ IsA()

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

§ SafeDownCast()

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

§ PrintSelf()

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

§ SLICE()

static vtkInformationIntegerKey* vtkTexturePainter::SLICE ( )
static

Specify the X, Y or Z slice to use.

The slice mode dictates how the data is slicde.

§ SLICE_MODE()

static vtkInformationIntegerKey* vtkTexturePainter::SLICE_MODE ( )
static

Specify how the slices are obtained.

§ MAP_SCALARS()

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.

§ LOOKUP_TABLE()

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.

§ SCALAR_MODE()

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.

§ SetScalarMode()

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.

§ GetScalarMode()

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.

§ SCALAR_ARRAY_NAME()

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.

§ SetScalarArrayName()

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.

§ GetScalarArrayName()

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.

§ SCALAR_ARRAY_INDEX()

static vtkInformationIntegerKey* vtkTexturePainter::SCALAR_ARRAY_INDEX ( )
static

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

§ SetScalarArrayIndex()

virtual void vtkTexturePainter::SetScalarArrayIndex ( int  )
virtual

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

§ GetScalarArrayIndex()

virtual int vtkTexturePainter::GetScalarArrayIndex ( )
virtual

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

§ SetSlice()

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.

§ GetSlice()

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.

§ SetSliceMode()

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.

§ GetSliceMode()

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.

§ SetLookupTable()

void vtkTexturePainter::SetLookupTable ( vtkScalarsToColors *  )

Set the lookuptable to use.

§ SetMapScalars()

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.

§ GetMapScalars()

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.

§ USE_XY_PLANE()

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.

§ SetUseXYPlane()

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.

§ UseXYPlaneOn()

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.

§ UseXYPlaneOff()

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.

§ GetUseXYPlane()

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.

§ ReleaseGraphicsResources()

virtual void vtkTexturePainter::ReleaseGraphicsResources ( vtkWindow *  )
virtual

§ SetWholeExtent() [1/2]

virtual void vtkTexturePainter::SetWholeExtent ( int  ,
int  ,
int  ,
int  ,
int  ,
int   
)
virtual

§ SetWholeExtent() [2/2]

virtual void vtkTexturePainter::SetWholeExtent ( int  [6])
virtual

§ ProcessInformation()

virtual void vtkTexturePainter::ProcessInformation ( vtkInformation *  )
protectedvirtual

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

§ RenderInternal()

virtual void vtkTexturePainter::RenderInternal ( vtkRenderer *  renderer,
vtkActor *  actor,
unsigned long  typeflags,
bool  forceCompileOnly 
)
protectedvirtual

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.

§ SetupScalars()

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

§ Slice

int vtkTexturePainter::Slice
protected

Definition at line 193 of file vtkTexturePainter.h.

§ SliceMode

int vtkTexturePainter::SliceMode
protected

Definition at line 194 of file vtkTexturePainter.h.

§ MapScalars

int vtkTexturePainter::MapScalars
protected

Definition at line 195 of file vtkTexturePainter.h.

§ ScalarMode

int vtkTexturePainter::ScalarMode
protected

Definition at line 196 of file vtkTexturePainter.h.

§ ScalarArrayIndex

int vtkTexturePainter::ScalarArrayIndex
protected

Definition at line 197 of file vtkTexturePainter.h.

§ UseXYPlane

int vtkTexturePainter::UseXYPlane
protected

Definition at line 198 of file vtkTexturePainter.h.

§ WholeExtent

int vtkTexturePainter::WholeExtent[6]
protected

Definition at line 199 of file vtkTexturePainter.h.

§ ScalarArrayName

char* vtkTexturePainter::ScalarArrayName
protected

Definition at line 200 of file vtkTexturePainter.h.

§ LookupTable

vtkScalarsToColors* vtkTexturePainter::LookupTable
protected

Definition at line 201 of file vtkTexturePainter.h.

§ QuadPoints

float vtkTexturePainter::QuadPoints[4][3]
protected

Definition at line 205 of file vtkTexturePainter.h.

§ Texture

vtkTexture* vtkTexturePainter::Texture
protected

Definition at line 208 of file vtkTexturePainter.h.

§ UpdateTime

vtkTimeStamp vtkTexturePainter::UpdateTime
protected

Definition at line 210 of file vtkTexturePainter.h.


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