VTKFIG  0.20.20181114
Easy VTK based in situ visualization
template<class IV >
void vtkfig::DataSet::SetCellMaskByMask ( const IV &  mask_in,
const std::string  name 
)
inline

Mask cells which shall be shown.

Template Parameters
IVVector class counting from zero with member functions size() and operator[]. std::vector will work.
Parameters
mask_inFlag array indicating if cell is in
nameName of the mask for later reference

Definition at line 658 of file vtkfigDataSet.h.

659  {
660  assert(cells_in.size()==this->data->GetNumberOfCells());
661  auto celllist=vtkSmartPointer<vtkIdList>::New();
662  int j=0;
663  for (int i=0;i<cells_in.size();i++)
664  if (cells_in[i]) celllist->InsertId(j++,i);
665  masks[name]=celllist;
666  }
std::map< std::string, vtkSmartPointer< vtkIdList > > masks
vtkSmartPointer< vtkDataSet > data