VTKFIG  0.20.20181114
Easy VTK based in situ visualization
template<class V >
void vtkfig::VectorView::SetQuiverRGBTable ( const V &  tab,
int  lutsize 
)
inline

Set quiver RGB table from vector.

Template Parameters
VVector class counting from zero with member functions size() and operator[]. std::vector will work.
Parameters
tabVector containg data. One RGB point is described by x, r, g, b between 0 and 1 RGB point i is contained in '(tab[4*i],tab[4*i+1],tab[4*i+2],tab[4*i+3])
lutsizeSize of lookup table created.

Definition at line 157 of file vtkfigVectorView.h.

158  {
159  RGBTable rgbtab;
160  rgbtab.resize(tab.size()/4);
161  for (int i=0,j=0; i<tab.size(); i+=4,j++)
162  {
163  rgbtab[j].x=tab[i+0];
164  rgbtab[j].r=tab[i+1];
165  rgbtab[j].g=tab[i+2];
166  rgbtab[j].b=tab[i+3];
167  }
168  SetQuiverRGBTable(rgbtab, lutsize);
169  }
void SetQuiverRGBTable(const V &tab, int lutsize)
Set quiver RGB table from vector.
std::vector< RGBPoint > RGBTable
Definition: vtkfigTools.h:26