VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
vtkScalarsToColorsPainter Class Reference

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

#include <vtkScalarsToColorsPainter.h>

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

List of all members.

Public Types

typedef vtkPainter Superclass

Public Member Functions

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

Static Public Member Functions

static vtkScalarsToColorsPainterNew ()
static int IsTypeOf (const char *type)
static vtkScalarsToColorsPainterSafeDownCast (vtkObjectBase *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

virtual vtkObjectBaseNewInstanceInternal () const
 vtkScalarsToColorsPainter ()
virtual ~vtkScalarsToColorsPainter ()
virtual 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 SetArrayComponent (int)
virtual void SetArrayId (int)
virtual void SetArrayName (const char *)
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
int LastUsedMultiplyWithAlpha
double ScalarRange [2]
int ScalarVisibility
int UseLookupTableScalarRange
vtkTimeStamp OutputUpdateTime
int UsingScalarColoring
static
vtkInformationObjectBaseKey
LOOKUP_TABLE ()
void SetLookupTable (vtkScalarsToColors *lut)
vtkScalarsToColorsGetLookupTable ()

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 42 of file vtkScalarsToColorsPainter.h.


Member Typedef Documentation

Reimplemented from vtkPainter.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

Definition at line 46 of file vtkScalarsToColorsPainter.h.


Constructor & Destructor Documentation


Member Function Documentation

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

Reimplemented from vtkObject.

Reimplemented in 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPainter.

Reimplemented in 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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkPainter.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

Reimplemented from vtkPainter.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

virtual vtkObjectBase* vtkScalarsToColorsPainter::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkPainter.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

Reimplemented from vtkPainter.

Reimplemented in 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 vtkOpenGLScalarsToColorsPainter.

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.

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.

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

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.

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.

Specify a lookup table for the mapper to use.

Specify a lookup table for the mapper to use.

Specify a lookup table for the mapper to use.

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

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

Controls what data array is used to generate colors.

Controls what data array is used to generate colors.

Controls what data array is used to generate colors.

Controls what data array is used to generate colors.

Set the light-model color mode.

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.

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

Reimplemented from vtkPainter.

Return the texture size limit. Subclasses need to override this to return the actual correct texture size limit. Here it is hardcoded to 1024.

Reimplemented in vtkOpenGLScalarsToColorsPainter.

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

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.

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]
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::SetArrayComponent ( int  ) [protected, virtual]
virtual void vtkScalarsToColorsPainter::SetArrayId ( int  ) [protected, virtual]
virtual void vtkScalarsToColorsPainter::SetArrayName ( const char *  ) [protected, virtual]

Member Data Documentation

Definition at line 181 of file vtkScalarsToColorsPainter.h.

Definition at line 185 of file vtkScalarsToColorsPainter.h.

Definition at line 186 of file vtkScalarsToColorsPainter.h.

Definition at line 187 of file vtkScalarsToColorsPainter.h.

Definition at line 188 of file vtkScalarsToColorsPainter.h.

Definition at line 190 of file vtkScalarsToColorsPainter.h.

Definition at line 193 of file vtkScalarsToColorsPainter.h.

Definition at line 194 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 198 of file vtkScalarsToColorsPainter.h.

Definition at line 199 of file vtkScalarsToColorsPainter.h.

Definition at line 201 of file vtkScalarsToColorsPainter.h.

Definition at line 202 of file vtkScalarsToColorsPainter.h.

Definition at line 203 of file vtkScalarsToColorsPainter.h.

Definition at line 204 of file vtkScalarsToColorsPainter.h.

Definition at line 206 of file vtkScalarsToColorsPainter.h.

Definition at line 210 of file vtkScalarsToColorsPainter.h.


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