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

Method SetInputData

Charts/Core/vtkPlotBox.cxx:200–231  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

198
199//------------------------------------------------------------------------------
200void vtkPlotBox::SetInputData(vtkTable* table)
201{
202 if (table == this->Data->GetInput() && (!table || table->GetMTime() < this->BuildTime))
203 {
204 return;
205 }
206
207 this->vtkPlot::SetInputData(table);
208
209 bool updateVisibility = table != this->Data->GetInput();
210 vtkChartBox* parent = vtkChartBox::SafeDownCast(this->Parent);
211
212 if (parent && table && updateVisibility)
213 {
214 parent->SetColumnVisibilityAll(false);
215 // By default make the first 10 columns visible in a plot.
216 for (vtkIdType i = 0; i < table->GetNumberOfColumns() && i < 10; ++i)
217 {
218 parent->SetColumnVisibility(table->GetColumnName(i), true);
219 }
220 }
221 else if (parent && updateVisibility)
222 {
223 // No table, therefore no visible columns
224 parent->GetVisibleColumns()->SetNumberOfTuples(0);
225 }
226 // Create a default lookup table is non set yet
227 if (!this->LookupTable)
228 {
229 this->CreateDefaultLookupTable();
230 }
231}
232
233//------------------------------------------------------------------------------
234namespace

Callers

nothing calls this directly

Calls 9

GetInputMethod · 0.45
GetMTimeMethod · 0.45
GetNumberOfColumnsMethod · 0.45
SetColumnVisibilityMethod · 0.45
GetColumnNameMethod · 0.45
SetNumberOfTuplesMethod · 0.45
GetVisibleColumnsMethod · 0.45

Tested by

no test coverage detected