VTKFIG  0.20.20181114
Easy VTK based in situ visualization
template<class IV >
void vtkfig::DataSet::SetCellMaskByList ( const IV &  cells_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
cells_inList of cells which shall be shown
nameName of the mask for later reference

Definition at line 670 of file vtkfigDataSet.h.

671  {
672  auto celllist=vtkSmartPointer<vtkIdList>::New();
673  int j=0;
674  for (int i=0;i<cells_in.size();i++)
675  celllist->InsertId(j++,cells_in[i]);
676  masks[name]=celllist;
677  }
std::map< std::string, vtkSmartPointer< vtkIdList > > masks