NAME
vtkAPixmap - scalar data in rgba (color + opacity) form
SYNOPSIS
#include "/opt/vtk-c++/common/vtkAPixmap.h"
class VTK_EXPORT vtkAPixmap : public vtkColorScalars
vtkAPixmap();
vtkAPixmap(const vtkAPixmap& fs);
vtkAPixmap(const int sz, const int ext=1000);
~vtkAPixmap();
int Allocate(const int sz, const int ext=1000) {return this->S->Allocate(4*sz,4*ext);};
void Initialize() {this->S->Initialize();};
static vtkAPixmap *New() {return new vtkAPixmap;};
const char *GetClassName() {return "vtkAPixmap";};
vtkScalars *MakeObject(int sze, int ext=1000);
int GetNumberOfScalars() {return (this->S->GetMaxId()+1)/4;};
void Squeeze() {this->S->Squeeze();};
int GetNumberOfValuesPerScalar() {return 4;};
vtkAPixmap &operator=(const vtkAPixmap& fs);
void operator+=(const vtkAPixmap& 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
vtkAPixmap is a concrete implementation of vtkColorScalars. Scalars are represented using three values for color (red, green, blue) plus alpha opacity value. Each of r,g,b,a components ranges from (0,255) (i.e., an unsigned char value).
SEE ALSO
vtkGraymap vtkAGraymap vtkPixmap vtkBitmap
SUMMARY
unsigned char *GetColor(int i)
Return a rgba color at array location i.
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.
vtkAPixmap& operator=(const vtkAPixmap& fs)
Deep copy of scalars.
void GetColor(int id, unsigned char rgba[4])
Copy rgba components into user provided array rgba[4] for specified point id.
void SetColor(int id, unsigned char rgba[4])
Insert color into object. No range checking performed (fast!).
void InsertColor(int id, unsigned char rgba[4])
Insert color into object. Range checking performed and memory allocated as necessary.
int InsertNextColor(unsigned char rgba[4])
Insert color into next available slot. Returns point id of slot.