#include <vtkScalarsToColorsPainter.h>
This is a painter that converts scalars to colors. It enable/disables coloring state depending on the ScalarMode. This painter is composite dataset enabled.
Definition at line 41 of file vtkScalarsToColorsPainter.h.
Reimplemented from vtkPainter.
Reimplemented in vtkMesaScalarsToColorsPainter, and vtkOpenGLScalarsToColorsPainter.
Definition at line 45 of file vtkScalarsToColorsPainter.h.
vtkScalarsToColorsPainter::vtkScalarsToColorsPainter | ( | ) | [protected] |
virtual vtkScalarsToColorsPainter::~vtkScalarsToColorsPainter | ( | ) | [protected, virtual] |
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 vtkTypeMacro 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 vtkTypeMacro 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.
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.
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] |
vtkDataObject* vtkScalarsToColorsPainter::OutputData [protected] |
Definition at line 175 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ArrayAccessMode [protected] |
Definition at line 179 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ArrayComponent [protected] |
Definition at line 180 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ArrayId [protected] |
Definition at line 181 of file vtkScalarsToColorsPainter.h.
char* vtkScalarsToColorsPainter::ArrayName [protected] |
Definition at line 182 of file vtkScalarsToColorsPainter.h.
vtkScalarsToColors* vtkScalarsToColorsPainter::LookupTable [protected] |
Definition at line 184 of file vtkScalarsToColorsPainter.h.
Definition at line 187 of file vtkScalarsToColorsPainter.h.
Definition at line 188 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ColorMode [protected] |
Definition at line 189 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::InterpolateScalarsBeforeMapping [protected] |
Definition at line 190 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ScalarMode [protected] |
Definition at line 191 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ScalarMaterialMode [protected] |
Definition at line 192 of file vtkScalarsToColorsPainter.h.
double vtkScalarsToColorsPainter::LastUsedAlpha [protected] |
Definition at line 193 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::LastUsedMultiplyWithAlpha [protected] |
Definition at line 195 of file vtkScalarsToColorsPainter.h.
double vtkScalarsToColorsPainter::ScalarRange[2] [protected] |
Definition at line 196 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::ScalarVisibility [protected] |
Definition at line 197 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::UseLookupTableScalarRange [protected] |
Definition at line 198 of file vtkScalarsToColorsPainter.h.
Definition at line 200 of file vtkScalarsToColorsPainter.h.
int vtkScalarsToColorsPainter::UsingScalarColoring [protected] |
Definition at line 204 of file vtkScalarsToColorsPainter.h.