vtkScalarsToColorsPainter Class Reference

#include <vtkScalarsToColorsPainter.h>

Inheritance diagram for vtkScalarsToColorsPainter:

Inheritance graph
[legend]
Collaboration diagram for vtkScalarsToColorsPainter:

Collaboration graph
[legend]

List of all members.


Detailed Description

painter that converts scalars to colors. It enable/disables coloring state depending on the ScalarMode.

This is a painter that converts scalars to colors. It enable/disables coloring state depending on the ScalarMode. This painter is composite dataset enabled.

Tests:
vtkScalarsToColorsPainter (Tests)

Definition at line 41 of file vtkScalarsToColorsPainter.h.

static
vtkInformationObjectBaseKey
LOOKUP_TABLE ()
void SetLookupTable (vtkScalarsToColors *lut)
vtkScalarsToColorsGetLookupTable ()

Public Types

typedef vtkPainter Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
virtual void CreateDefaultLookupTable ()
virtual int GetPremultiplyColorsWithAlpha (vtkActor *actor)
virtual vtkDataObjectGetOutput ()

Static Public Member Functions

static vtkScalarsToColorsPainterNew ()
static int IsTypeOf (const char *type)
static vtkScalarsToColorsPainterSafeDownCast (vtkObject *o)
static vtkInformationIntegerKeyUSE_LOOKUP_TABLE_SCALAR_RANGE ()
static
vtkInformationDoubleVectorKey
SCALAR_RANGE ()
static vtkInformationIntegerKeySCALAR_MODE ()
static vtkInformationIntegerKeyCOLOR_MODE ()
static vtkInformationIntegerKeyINTERPOLATE_SCALARS_BEFORE_MAPPING ()
static vtkInformationIntegerKeySCALAR_VISIBILITY ()
static vtkInformationIntegerKeySCALAR_MATERIAL_MODE ()
static vtkInformationIntegerKeyARRAY_ACCESS_MODE ()
static vtkInformationIntegerKeyARRAY_ID ()
static vtkInformationStringKeyARRAY_NAME ()
static vtkInformationIntegerKeyARRAY_COMPONENT ()

Protected Member Functions

 vtkScalarsToColorsPainter ()
virtual ~vtkScalarsToColorsPainter ()
vtkDataObjectNewClone (vtkDataObject *data)
virtual void PrepareForRendering (vtkRenderer *renderer, vtkActor *actor)
virtual void ProcessInformation (vtkInformation *)
virtual void ReportReferences (vtkGarbageCollector *collector)
int CanUseTextureMapForColoring (vtkDataObject *input)
void UpdateColorTextureMap (double alpha, int multiply_with_alpha)
virtual void SetUseLookupTableScalarRange (int)
virtual void SetScalarRange (double, double)
void SetScalarRange (double[2])
virtual void SetScalarMode (int)
virtual void SetColorMode (int)
virtual void SetInterpolateScalarsBeforeMapping (int)
virtual void SetScalarVisibility (int)
virtual void SetScalarMaterialMode (int)
virtual void SetArrayAccessMode (int)
virtual void SetArrayId (int)
virtual void SetArrayName (const char *)
virtual void SetArrayComponent (int)
void MapScalarsToTexture (vtkDataSet *output, vtkDataArray *scalars, vtkDataSet *input)
virtual void MapScalars (vtkDataSet *output, double alpha, int multiply_with_alpha, vtkDataSet *input)

Protected Attributes

vtkDataObjectOutputData
int ArrayAccessMode
int ArrayComponent
int ArrayId
char * ArrayName
vtkScalarsToColorsLookupTable
vtkSmartPointer
< vtkScalarsToColors
ScalarsLookupTable
vtkSmartPointer< vtkImageDataColorTextureMap
int ColorMode
int InterpolateScalarsBeforeMapping
int ScalarMode
int ScalarMaterialMode
double LastUsedAlpha
double ScalarRange [2]
int ScalarVisibility
int UseLookupTableScalarRange
vtkTimeStamp OutputUpdateTime
int UsingScalarColoring

Member Typedef Documentation

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

Definition at line 45 of file vtkScalarsToColorsPainter.h.


Constructor & Destructor Documentation

vtkScalarsToColorsPainter::vtkScalarsToColorsPainter (  )  [protected]

virtual vtkScalarsToColorsPainter::~vtkScalarsToColorsPainter (  )  [protected, virtual]


Member Function Documentation

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

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

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

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

static int vtkScalarsToColorsPainter::IsTypeOf ( const char *  name  )  [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

virtual int vtkScalarsToColorsPainter::IsA ( const char *  name  )  [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

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

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

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

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkPainter.

Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::USE_LOOKUP_TABLE_SCALAR_RANGE (  )  [static]

Control whether the mapper sets the lookuptable range based on its own ScalarRange, or whether it will use the LookupTable ScalarRange regardless of it's own setting. By default the Mapper is allowed to set the LookupTable range, but users who are sharing LookupTables between mappers/actors will probably wish to force the mapper to use the LookupTable unchanged.

static vtkInformationDoubleVectorKey* vtkScalarsToColorsPainter::SCALAR_RANGE (  )  [static]

Specify range in terms of scalar minimum and maximum (smin,smax). These values are used to map scalars into lookup table. Has no effect when UseLookupTableScalarRange is true.

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

Control how the painter works with scalar point data and cell attribute data. See vtkMapper::ScalarMode for more details.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::COLOR_MODE (  )  [static]

Control how the scalar data is mapped to colors. By default (ColorModeToDefault), unsigned char scalars are treated as colors, and NOT mapped through the lookup table, while everything else is. Setting ColorModeToMapScalars means that all scalar data will be mapped through the lookup table.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::INTERPOLATE_SCALARS_BEFORE_MAPPING (  )  [static]

By default, vertex color is used to map colors to a surface. Colors are interpolated after being mapped. This option avoids color interpolation by using a one dimensional texture map for the colors.

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

Specify a lookup table for the mapper to use.

void vtkScalarsToColorsPainter::SetLookupTable ( vtkScalarsToColors lut  ) 

Specify a lookup table for the mapper to use.

vtkScalarsToColors* vtkScalarsToColorsPainter::GetLookupTable (  ) 

Specify a lookup table for the mapper to use.

virtual void vtkScalarsToColorsPainter::CreateDefaultLookupTable (  )  [virtual]

Create default lookup table. Generally used to create one when none is available with the scalar data.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::SCALAR_VISIBILITY (  )  [static]

Turn on/off flag to control whether scalar data is used to color objects.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::ARRAY_ACCESS_MODE (  )  [static]

Controls what data array is used to generate colors.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::ARRAY_ID (  )  [static]

Controls what data array is used to generate colors.

static vtkInformationStringKey* vtkScalarsToColorsPainter::ARRAY_NAME (  )  [static]

Controls what data array is used to generate colors.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::ARRAY_COMPONENT (  )  [static]

Controls what data array is used to generate colors.

static vtkInformationIntegerKey* vtkScalarsToColorsPainter::SCALAR_MATERIAL_MODE (  )  [static]

Set the light-model color mode.

virtual int vtkScalarsToColorsPainter::GetPremultiplyColorsWithAlpha ( vtkActor actor  )  [virtual]

For alpha blending, we sometime premultiply the colors with alpha and change the alpha blending function. This call returns whether we are premultiplying or using the default blending function. Currently this checks if the actor has a texture, if not it returns true. TODO: It is possible to make this decision dependent on key passed down from a painter upstream that makes a more informed decision for alpha blending depending on extensions available, for example.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

virtual vtkDataObject* vtkScalarsToColorsPainter::GetOutput (  )  [virtual]

Subclasses need to override this to return the output of the pipeline.

Reimplemented from vtkPainter.

vtkDataObject* vtkScalarsToColorsPainter::NewClone ( vtkDataObject data  )  [protected]

Create a new shallow-copied clone for data with no scalars.

void vtkScalarsToColorsPainter::MapScalarsToTexture ( vtkDataSet output,
vtkDataArray scalars,
vtkDataSet input 
) [protected]

Create texture coordinates for the output assuming a texture for the lookuptable has already been created correctly. this->LookupTable is the lookuptable used.

virtual void vtkScalarsToColorsPainter::PrepareForRendering ( vtkRenderer renderer,
vtkActor actor 
) [protected, virtual]

Called just before RenderInternal(). We build the Color array here.

Reimplemented from vtkPainter.

virtual void vtkScalarsToColorsPainter::MapScalars ( vtkDataSet output,
double  alpha,
int  multiply_with_alpha,
vtkDataSet input 
) [protected, virtual]

Generates the colors, if needed. If multiply_with_alpha is set, the colors are multiplied with alpha.

virtual void vtkScalarsToColorsPainter::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 vtkScalarsToColorsPainter::ReportReferences ( vtkGarbageCollector collector  )  [protected, virtual]

Take part in garbage collection.

Reimplemented from vtkPainter.

int vtkScalarsToColorsPainter::CanUseTextureMapForColoring ( vtkDataObject input  )  [protected]

Returns if we can use texture maps for scalar coloring. Note this doesn't say we "will" use scalar coloring. It says, if we do use scalar coloring, we will use a 1D texture. When rendering multiblock datasets, if any 2 blocks provide different lookup tables for the scalars, then also we cannot use textures. This case can be handled if required.

void vtkScalarsToColorsPainter::UpdateColorTextureMap ( double  alpha,
int  multiply_with_alpha 
) [protected]

Should not be called if CanUseTextureMapForColoring() returns 0.

virtual void vtkScalarsToColorsPainter::SetUseLookupTableScalarRange ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetScalarRange ( double  ,
double   
) [protected, virtual]

void vtkScalarsToColorsPainter::SetScalarRange ( double  [2]  )  [protected]

virtual void vtkScalarsToColorsPainter::SetScalarMode ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetColorMode ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetInterpolateScalarsBeforeMapping ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetScalarVisibility ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetScalarMaterialMode ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetArrayAccessMode ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetArrayId ( int   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetArrayName ( const char *   )  [protected, virtual]

virtual void vtkScalarsToColorsPainter::SetArrayComponent ( int   )  [protected, virtual]


Member Data Documentation

Definition at line 175 of file vtkScalarsToColorsPainter.h.

Definition at line 179 of file vtkScalarsToColorsPainter.h.

Definition at line 180 of file vtkScalarsToColorsPainter.h.

Definition at line 181 of file vtkScalarsToColorsPainter.h.

Definition at line 182 of file vtkScalarsToColorsPainter.h.

Definition at line 184 of file vtkScalarsToColorsPainter.h.

Definition at line 187 of file vtkScalarsToColorsPainter.h.

Definition at line 188 of file vtkScalarsToColorsPainter.h.

Definition at line 189 of file vtkScalarsToColorsPainter.h.

Definition at line 190 of file vtkScalarsToColorsPainter.h.

Definition at line 191 of file vtkScalarsToColorsPainter.h.

Definition at line 192 of file vtkScalarsToColorsPainter.h.

Definition at line 193 of file vtkScalarsToColorsPainter.h.

Definition at line 195 of file vtkScalarsToColorsPainter.h.

Definition at line 196 of file vtkScalarsToColorsPainter.h.

Definition at line 197 of file vtkScalarsToColorsPainter.h.

Definition at line 199 of file vtkScalarsToColorsPainter.h.

Definition at line 203 of file vtkScalarsToColorsPainter.h.


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

Generated on Wed Jun 3 19:32:47 2009 for VTK by  doxygen 1.5.6