NAME
vtkPixmap - scalar data in RGB (color) form
SYNOPSIS
#include "/opt/vtk-c++/common/vtkPixmap.h"
class VTK_EXPORT vtkPixmap : public vtkColorScalars
vtkPixmap();
vtkPixmap(const vtkPixmap& fs);
vtkPixmap(const int sz, const int ext=1000);
~vtkPixmap();
static vtkPixmap *New() {return new vtkPixmap;};
const char *GetClassName() {return "vtkPixmap";};
void Initialize() {this->S->Initialize();};
int Allocate(const int sz, const int ext=1000) {return this->S->Allocate(3*sz,3*ext);};
vtkScalars *MakeObject(int sze, int ext=1000);
int GetNumberOfScalars() {return (this->S->GetMaxId()+1)/3;};
void Squeeze() {this->S->Squeeze();};
int GetNumberOfValuesPerScalar() {return 3;};
vtkPixmap &operator=(const vtkPixmap& fs);
void operator+=(const vtkPixmap& fs) {*(this->S) += *(fs.S);};
void Reset() {this->S->Reset();};
unsigned char *GetPointer(const int id);
unsigned char *WritePointer(const int id, const int number);
unsigned char *GetColor(int id);
void GetColor(int id, unsigned char rgba[4]);
void SetNumberOfColors(int number);
void SetColor(int id, unsigned char rgba[4]);
void InsertColor(int id, unsigned char rgba[4]);
int InsertNextColor(unsigned char rgba[4]);
vtkUnsignedCharArray *GetS();
DESCRIPTION
vtkPixmap is a concrete implementation of vtkScalars. Scalars are represented using three values for color (red, green, blue). Each of r,g,b ranges from (0,255) (i.e., an unsigned char value).
SUMMARY
void SetColor(int i, unsigned char rgba[4])
Set a rgba color value at a particular array location. Does not do range checking. Make sure you use SetNumberOfColors() to allocate memory prior to using
SetColor().
void InsertColor(int i, unsigned char rgba[4])
Insert a rgba color value at a particular array location. Does range checking and will allocate additional memory if necessary.
int InsertNextColor(unsigned char *rgba)
Insert a rgba value at the next available slot in the array. Will allocate memory if necessary.
unsigned char *GetPointer(const int id)
Get pointer to array of data starting at data position "id".
unsigned char *WritePointer(const int id, const int number) Get pointer to data array. Useful for direct writes of data. MaxId is bumped by number (and memory allocated if necessary). Id is the location you wish to write into; number is the number of scalars to write.
vtkPixmap& operator=(const vtkPixmap& fs)
Deep copy of scalars.
unsigned char *GetColor(int i)
Return a rgba color at array location i.
void GetColor(int id, unsigned char rgba[4])
Copy rgba components into user provided array rgb[4] for specified point id.