MCPcopy Create free account
hub / github.com/Kitware/VTK / ClearBrushPoints

Method ClearBrushPoints

Views/Infovis/vtkParallelCoordinatesView.cxx:353–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353void vtkParallelCoordinatesView::ClearBrushPoints()
354{
355 this->NumberOfBrushPoints = 0;
356
357 vtkIdType npts = this->BrushData->GetPoints()->GetNumberOfPoints();
358 for (vtkIdType i = 0; i < npts; i++)
359 this->BrushData->GetPoints()->SetPoint(i, -1, -1, 0);
360
361 // clear them for all of the lines
362 vtkNew<vtkIdList> cell;
363 auto cellIter = vtk::TakeSmartPointer(this->BrushData->GetLines()->NewIterator());
364 for (cellIter->GoToFirstCell(); !cellIter->IsDoneWithTraversal(); cellIter->GoToNextCell())
365 {
366 const vtkIdType cellNum = cellIter->GetCurrentCellId();
367 cellIter->GetCurrentCell(cell);
368
369 for (vtkIdType j = 0; j < cell->GetNumberOfIds(); j++)
370 {
371 cell->SetId(j, cellNum * this->MaximumNumberOfBrushPoints);
372 }
373
374 cellIter->ReplaceCurrentCell(cell);
375 }
376
377 this->BrushData->Modified();
378}
379
380//------------------------------------------------------------------------------
381int vtkParallelCoordinatesView::AddLassoBrushPoint(double* p)

Callers 3

SetBrushModeMethod · 0.95
SelectDataMethod · 0.95

Calls 10

GoToNextCellMethod · 0.80
GetNumberOfPointsMethod · 0.45
GetPointsMethod · 0.45
SetPointMethod · 0.45
NewIteratorMethod · 0.45
GetLinesMethod · 0.45
IsDoneWithTraversalMethod · 0.45
GetNumberOfIdsMethod · 0.45
SetIdMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected