NAME
vtkBitScalars - packed bit (0/1) representation of scalar data
SYNOPSIS
#include "/opt/vtk-c++/common/vtkBitScalars.h"
class VTK_EXPORT vtkBitScalars : public vtkScalars
vtkBitScalars();
vtkBitScalars(const vtkBitScalars& cs);
vtkBitScalars(const int sz, const int ext=1000);
~vtkBitScalars();
int Allocate(const int sz, const int ext=1000) {return this->S->Allocate(sz,ext);};
void Initialize() {this->S->Initialize();};
static vtkBitScalars *New() {return new vtkBitScalars;};
const char *GetClassName() {return "vtkBitScalars";};
vtkScalars *MakeObject(int sze, int ext=1000);
char *GetDataType() {return "bit";};
void GetDataTypeRange (float* range) { range[0] = 0.0;
range[1] = 1.0; return;}
float GetDataTypeMin() { return 0.0; }
float GetDataTypeMax() { return 1.0; }
int GetNumberOfScalars() {return (this->S->GetMaxId()+1);};
void Squeeze() {this->S->Squeeze();};
float GetScalar(int i) {return (float)this->S->GetValue(i);};
void SetNumberOfScalars(int number);
void SetScalar(int i, int s) {this->S->SetValue(i,s);};
void SetScalar(int i, float s) {this->S->SetValue(i,(int)s);};
void InsertScalar(int i, float s) {S->InsertValue(i,(int)s);};
void InsertScalar(int i, int s) {S->InsertValue(i,s);};
int InsertNextScalar(int s) {return S->InsertNextValue(s);};
int InsertNextScalar(float s) {return S->InsertNextValue((int)s);};
void GetScalars(vtkIdList& ptIds, vtkFloatScalars& fs);
unsigned char *GetPointer(const int id);
unsigned char *WritePointer(const int id, const int number);
vtkBitScalars &operator=(const vtkBitScalars& cs);
void operator+=(const vtkBitScalars& cs) {*(this->S) += *(cs.S);};
void Reset() {this->S->Reset();};
DESCRIPTION
vtkBitScalars is a concrete implementation of vtkScalars. Scalars are represented using a packed bit array. Only possible scalar values are (0/1).
SUMMARY
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.
vtkBitScalars& operator=(const vtkBitScalars& cs)
Deep copy of scalars.