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

Method ReverseTableColumns

Views/Infovis/vtkTreeHeatmapItem.cxx:299–314  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

297
298//------------------------------------------------------------------------------
299void vtkTreeHeatmapItem::ReverseTableColumns()
300{
301 // make a copy of our table and then empty out the original.
302 vtkNew<vtkTable> tableCopy;
303 tableCopy->DeepCopy(this->GetTable());
304 for (vtkIdType col = tableCopy->GetNumberOfColumns() - 1; col > 0; --col)
305 {
306 this->GetTable()->RemoveColumn(col);
307 }
308
309 // re-insert the columns back into our original table in reverse order
310 for (vtkIdType col = tableCopy->GetNumberOfColumns() - 1; col >= 1; --col)
311 {
312 this->GetTable()->AddColumn(tableCopy->GetColumn(col));
313 }
314}
315
316//------------------------------------------------------------------------------
317bool vtkTreeHeatmapItem::Paint(vtkContext2D* painter)

Callers 2

ReorderTableMethod · 0.95
SetOrientationMethod · 0.95

Calls 6

GetTableMethod · 0.95
RemoveColumnMethod · 0.80
DeepCopyMethod · 0.45
GetNumberOfColumnsMethod · 0.45
AddColumnMethod · 0.45
GetColumnMethod · 0.45

Tested by

no test coverage detected