#include <vtkScalars.h>
Inheritance diagram for vtkScalars:
Public Methods | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
void | SetData (vtkDataArray *) |
vtkAttributeData * | MakeObject () |
void | SetNumberOfScalars (int number) |
int | GetNumberOfScalars () |
float | GetScalar (int id) |
void | SetScalar (int id, float s) |
void | InsertScalar (int id, float s) |
int | InsertNextScalar (float s) |
void | SetNumberOfComponents (int num) |
int | GetNumberOfComponents () |
virtual void | SetActiveComponent (int) |
virtual int | GetActiveComponent () |
void | ComputeRange () |
float * | GetRange () |
void | GetRange (float range[2]) |
void | GetDataTypeRange (double range[2]) |
double | GetDataTypeMin () |
double | GetDataTypeMax () |
virtual void | CreateDefaultLookupTable () |
void | SetLookupTable (vtkLookupTable *lut) |
virtual vtkLookupTable * | GetLookupTable () |
void | GetScalars (vtkIdList *ptIds, vtkScalars *fv) |
void | GetScalars (int p1, int p2, vtkScalars *fs) |
int | InitColorTraversal (float alpha, vtkScalarsToColors *lut, int colorMode=VTK_COLOR_MODE_DEFAULT) |
unsigned char * | GetColor (int id) |
void | GetScalars (vtkIdList &ptIds, vtkScalars &fv) |
void | GetScalars (int p1, int p2, vtkScalars &fs) |
Static Public Methods | |
vtkScalars * | New () |
vtkScalars * | New (int dataType, int numComp=1) |
int | IsTypeOf (const char *type) |
vtkScalars * | SafeDownCast (vtkObject *o) |
Protected Methods | |
vtkScalars () | |
~vtkScalars () | |
vtkScalars (const vtkScalars &) | |
void | operator= (const vtkScalars &) |
unsigned char * | PassRGBA (int id) |
unsigned char * | PassRGB (int id) |
unsigned char * | PassIA (int id) |
unsigned char * | PassI (int id) |
unsigned char * | CompositeRGBA (int id) |
unsigned char * | CompositeIA (int id) |
unsigned char * | CompositeMapThroughLookupTable (int id) |
unsigned char * | MapThroughLookupTable (int id) |
unsigned char * | Luminance (int id) |
Protected Attributes | |
float | Range [8] |
vtkTimeStamp | ComputeTime |
vtkLookupTable * | LookupTable |
int | ActiveComponent |
float | CurrentAlpha |
vtkScalarsToColors * | CurrentLookupTable |
unsigned char *(vtkScalars::* | CurrentColorFunction )(int id) |
vtkUnsignedCharArray * | Colors |
unsigned char | RGBA [4] |
vtkScalars provides an interface to scalar data. The data model for vtkScalars is an array accessible by point or cell id. Scalar data is represented by a subclass of vtkDataArray, and may be any any type of data, although generic operations on scalar data is performed using floating point values.
Scalars typically provide a single value per point. However, there are types of scalars that have multiple values or components. (For example, scalars that represent (RGB) color information, etc.) In this case, the ActiveComponent instance variable is used to indicate which component value is to be used for scalar data.
Because of the close relationship between scalars and colors, scalars also maintain an internal lookup table. If provided, this table is used to map scalars into colors, rather than the lookup table that the vtkMapper objects are associated with.
|
Determine (rmin,rmax) range of scalar values. |
|
Create default lookup table. Generally used to create one when none is available. |
|
Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkAttributeData. |
|
Get the color value at a particular id. Returns a pointer to a 4-byte array of rgba. Make sure you call InitColorTraversal() before invoking this method. |
|
These methods return the Min and Max possible range of the native data type. For example if a vtkScalars consists of unsigned char data these will return (0,255). |
|
Return number of scalars in the array. |
|
Return the range of scalar values. Range copied into array provided. |
|
Return the range of scalar values. Data returned as pointer to float array of length 2. |
|
Return the scalar value as a float for a specific id. |
|
For legacy compatibility. Do not use. |
|
Get the scalar values for the range of points ids specified (i.e., p1->p2 inclusive). You must insure that the vtkScalars has been previously allocated with enough space to hold the data. |
|
Given a list of point ids, return an array of scalar values. |
|
Initialize the traversal of the scalar data to generate colors (typically used during the rendering process). The method takes an alpha opacity value and returns a flag indicating whether alpha blending will occur. Also takes a lookup table used to map the scalar data. The color mode parameter controls how the scalar data is mapped to colors (see vtkMapper::ColorMode methods for a definition). |
|
Insert Scalar at end of array and return its location (id) in the array. |
|
Insert Scalar into object. Range checking performed and memory allocated as necessary. |
|
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 vtkAttributeData. |
|
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 vtkAttributeData. |
|
Create a copy of this object. Implements vtkAttributeData. |
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on. Reimplemented from vtkObject. Reimplemented in vtkFloatScalars. |
|
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 vtkAttributeData. |
|
Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h. Reimplemented from vtkAttributeData. |
|
Set/Get the active scalar component. This ivar specifies which value (or component) to use with multivalued scalars. Currently, a scalar can have at most four components (assumed RGBA). |
|
Set the data for this object. The tuple dimension must be consistent with the object. Reimplemented from vtkAttributeData. Reimplemented in vtkFloatScalars. |
|
Set/get the lookup table associated with this scalar data, if any. |
|
Specify/Get the number of components in scalar data. |
|
Specify the number of scalars for this object to hold. Make sure that you set the number of components in texture first. |
|
Insert Scalar into object. No range checking performed (fast!). Make sure you use SetNumberOfScalars() to allocate memory prior to using SetScalar(). |