vtkScalars
功能:
abstract class to an array of scalar data;
usually single value per points ,but there are exceptions(vtkPixmap,vtkAPixmap);
maintain a lookup table for mapping scalars to colors
数据:
//此类只用前两个,申请8位数组可能是准备后面使用
float Range[8];
vtkTimeStamp ComputeTime; // Time at which range computed
vtkLookupTable *LookupTable;
函数:
//计算Range (初始为【0-1】),使用到时间戳
virtual void ComputeRange();
float *GetRange();
//使用到Register和unRegister
virtual void CreateDefaultLookupTable();
void SetLookupTable(vtkLookupTable *lut);
vtkGetObjectMacro(LookupTable,vtkLookupTable);
vtkFloatScalars
功能:
concrete implementation of vtkScalars
数据:
vtkFloatArray S
vtkColorScalars
功能:
abatract class for muti color scalars;
by default get the luminuse value for getSclars;
函数:
//返回rgba的最大值,并转为0-1
float vtkColorScalars::GetScalar(int i)
//分别调用相对应的Color函数,其中使用到vtkLookupTable->MapValue(s)
void SetScalar(int i, float s);
void InsertScalar(int i, float s);
int InsertNextScalar(float s);
//存入VtkAPixmap中
void vtkColorScalars::GetColors(vtkIdList& ptId, vtkAPixmap& p)
//返回rgba的范围(0-255)
void GetComponentRange(unsigned char range[8]);
unsigned char *GetComponentRange();
vtkAPixMap:
功能:
concrete class for vtkColorScalars,have rgba(0-255) four components
数据:
vtkUnsignedCharArray S;