Commit 4ea36770 authored by Berk Geveci's avatar Berk Geveci

Replace SetInput etc. with SetInputData etc.

Since the behaviour of SetInput changed - it no
longer connects the pipeline but sets up the data
object as the input -, it was decided to rename
it to SetInputData. This includes similar methods
such as AddInputData. This commit makes on
sweeping change that compiles.
parent d10d7093
......@@ -76,15 +76,15 @@ int TestBarGraph(int , char * [])
vtkPlot *plot = 0;
plot = chart->AddPlot(vtkChart::BAR);
plot->SetInput(table.GetPointer(), 0, 1);
plot->SetInputData(table.GetPointer(), 0, 1);
plot->SetColor(0, 255, 0, 255);
plot = chart->AddPlot(vtkChart::BAR);
plot->SetInput(table.GetPointer(), 0, 2);
plot->SetInputData(table.GetPointer(), 0, 2);
plot->SetColor(255, 0, 0, 255);
plot = chart->AddPlot(vtkChart::BAR);
plot->SetInput(table.GetPointer(), 0, 3);
plot->SetInputData(table.GetPointer(), 0, 3);
plot->SetColor(0, 0, 255, 255);
//Finally render the scene and compare the image to a reference image
......
......@@ -77,19 +77,19 @@ int TestBarGraphHorizontal(int , char * [])
plot = chart->AddPlot(vtkChart::BAR);
barPlot = vtkPlotBar::SafeDownCast(plot);
barPlot->SetInput(table.GetPointer(), 0, 1);
barPlot->SetInputData(table.GetPointer(), 0, 1);
barPlot->SetOrientation(vtkPlotBar::HORIZONTAL);
barPlot->SetColor(0, 255, 0, 255);
plot = chart->AddPlot(vtkChart::BAR);
barPlot = vtkPlotBar::SafeDownCast(plot);
barPlot->SetInput(table.GetPointer(), 0, 2);
barPlot->SetInputData(table.GetPointer(), 0, 2);
barPlot->SetOrientation(vtkPlotBar::HORIZONTAL);
barPlot->SetColor(255, 0, 0, 255);
plot = chart->AddPlot(vtkChart::BAR);
barPlot = vtkPlotBar::SafeDownCast(plot);
barPlot->SetInput(table.GetPointer(), 0, 3);
barPlot->SetInputData(table.GetPointer(), 0, 3);
barPlot->SetOrientation(vtkPlotBar::HORIZONTAL);
barPlot->SetColor(0, 0, 255, 255);
......
......@@ -52,7 +52,7 @@ int TestHistogram2D(int, char * [])
cos(vtkMath::RadiansFromDegrees(double(j)));
}
}
chart->SetInput(data.GetPointer());
chart->SetInputData(data.GetPointer());
vtkNew<vtkColorTransferFunction> transferFunction;
transferFunction->AddHSVSegment(0.0, 0.0, 1.0, 1.0,
......
......@@ -61,15 +61,15 @@ int TestLinePlot( int, char * [] )
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table.GetPointer(), 0, 1);
line->SetInputData(table.GetPointer(), 0, 1);
line->SetColor(0, 255, 0, 255);
line->SetWidth(1.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table.GetPointer(), 0, 2);
line->SetInputData(table.GetPointer(), 0, 2);
line->SetColor(255, 0, 0, 255);
line->SetWidth(5.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table.GetPointer(), 0, 3);
line->SetInputData(table.GetPointer(), 0, 3);
line->SetColor(0, 0, 255, 255);
line->SetWidth(4.0);
......
......@@ -165,15 +165,15 @@ int TestLinePlotInteraction(int, char * [])
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
line->SetColor(0, 255, 0, 255);
line->SetWidth(1.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 2);
line->SetInputData(table, 0, 2);
line->SetColor(255, 0, 0, 255);
line->SetWidth(5.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 3);
line->SetInputData(table, 0, 3);
line->SetColor(0, 0, 255, 255);
line->SetWidth(4.0);
......
......@@ -94,15 +94,15 @@ int TestMultipleChartRenderers(int , char * [])
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
line->SetColor(0, 255, 0, 255);
line->SetWidth(1.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 2);
line->SetInputData(table, 0, 2);
line->SetColor(255, 0, 0, 255);
line->SetWidth(5.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 3);
line->SetInputData(table, 0, 3);
line->SetColor(0, 0, 255, 255);
line->SetWidth(4.0);
}
......
......@@ -103,15 +103,15 @@ int TestMultipleRenderers(int , char * [])
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
line->SetColor(0, 255, 0, 255);
line->SetWidth(1.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 2);
line->SetInputData(table, 0, 2);
line->SetColor(255, 0, 0, 255);
line->SetWidth(5.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 3);
line->SetInputData(table, 0, 3);
line->SetColor(0, 0, 255, 255);
line->SetWidth(4.0);
......
......@@ -61,7 +61,7 @@ int TestParallelCoordinates(int , char* [])
table->SetValue(i, 3, tan(i * inc) + 0.5);
}
chart->GetPlot(0)->SetInput(table.GetPointer());
chart->GetPlot(0)->SetInputData(table.GetPointer());
view->GetRenderWindow()->SetMultiSamples(0);
view->GetInteractor()->Initialize();
......
......@@ -65,7 +65,7 @@ int TestPieChart(int , char * [])
// Add multiple line plots, setting the colors etc
vtkPlotPie *pie = vtkPlotPie::SafeDownCast(chart->AddPlot(0));
pie->SetColorSeries(colorSeries.GetPointer());
pie->SetInput(table.GetPointer());
pie->SetInputData(table.GetPointer());
pie->SetInputArray(0, "2008 Circulation");
pie->SetLabels(labelArray.GetPointer());
......
......@@ -62,15 +62,15 @@ int TestPlotMatrix( int, char * [] )
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
line->SetColor(0, 255, 0, 255);
line->SetWidth(1.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 2);
line->SetInputData(table, 0, 2);
line->SetColor(255, 0, 0, 255);
line->SetWidth(5.0);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 3);
line->SetInputData(table, 0, 3);
line->SetColor(0, 0, 255, 255);
line->SetWidth(4.0);
......@@ -82,7 +82,7 @@ int TestPlotMatrix( int, char * [] )
vtkSmartPointer<vtkChartXY> chart2 = vtkSmartPointer<vtkChartXY>::New();
view->GetScene()->AddItem(chart2);
line = chart2->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
chart2->SetAutoSize(false);
chart2->SetSize(vtkRectf(200.0, 0.0, 200.0, 150.0));
......@@ -90,7 +90,7 @@ int TestPlotMatrix( int, char * [] )
vtkSmartPointer<vtkChartXY> chart3 = vtkSmartPointer<vtkChartXY>::New();
view->GetScene()->AddItem(chart3);
line = chart3->AddPlot(vtkChart::POINTS);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
chart3->SetAutoSize(false);
chart3->SetSize(vtkRectf(0.0, 150.0, 200.0, 150.0));
......@@ -98,7 +98,7 @@ int TestPlotMatrix( int, char * [] )
vtkSmartPointer<vtkChartXY> chart4 = vtkSmartPointer<vtkChartXY>::New();
view->GetScene()->AddItem(chart4);
line = chart4->AddPlot(vtkChart::BAR);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
chart4->GetAxis(vtkAxis::BOTTOM)->SetBehavior(vtkAxis::FIXED);
chart4->GetAxis(vtkAxis::BOTTOM)->SetRange(0.0, 10.0);
chart4->SetAutoSize(false);
......
......@@ -64,17 +64,17 @@ int TestScatterPlot(int , char * [])
// Add multiple line plots, setting the colors etc
vtkPlot *points = chart->AddPlot(vtkChart::POINTS);
points->SetInput(table, 0, 1);
points->SetInputData(table, 0, 1);
points->SetColor(0, 0, 0, 255);
points->SetWidth(1.0);
vtkPlotPoints::SafeDownCast(points)->SetMarkerStyle(vtkPlotPoints::CROSS);
points = chart->AddPlot(vtkChart::POINTS);
points->SetInput(table, 0, 2);
points->SetInputData(table, 0, 2);
points->SetColor(0, 0, 0, 255);
points->SetWidth(1.0);
vtkPlotPoints::SafeDownCast(points)->SetMarkerStyle(vtkPlotPoints::PLUS);
points = chart->AddPlot(vtkChart::POINTS);
points->SetInput(table, 0, 3);
points->SetInputData(table, 0, 3);
points->SetColor(0, 0, 255, 255);
points->SetWidth(4.0);
......
......@@ -63,13 +63,13 @@ int TestScientificPlot(int, char * [])
// Add multiple line plots, setting the colors etc
vtkPlot *line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 1);
line->SetInputData(table, 0, 1);
line->SetColor(0, 255, 0, 255);
line = chart->AddPlot(vtkChart::LINE);
line->SetInput(table, 0, 2);
line->SetInputData(table, 0, 2);
line->SetColor(255, 0, 0, 255);
line = chart->AddPlot(vtkChart::POINTS);
line->SetInput(table, 0, 3);
line->SetInputData(table, 0, 3);
line->SetColor(0, 0, 255, 255);
// Set up a scientific plot...
......
......@@ -115,7 +115,7 @@ int TestStackedBarGraph(int , char * [])
bar = vtkPlotBar::SafeDownCast(chart->AddPlot(vtkChart::BAR));
bar->SetColorSeries(colorSeries1);
bar->SetInput(table, "Month", "Books 2008");
bar->SetInputData(table, "Month", "Books 2008");
bar->SetInputArray(2,"New / Popular 2008");
bar->SetInputArray(3,"Periodical 2008");
bar->SetInputArray(4,"Audiobook 2008");
......@@ -126,7 +126,7 @@ int TestStackedBarGraph(int , char * [])
bar = vtkPlotBar::SafeDownCast(chart->AddPlot(vtkChart::BAR));
bar->SetColorSeries(colorSeries2);
bar->SetInput(table, "Month", "Books 2009");
bar->SetInputData(table, "Month", "Books 2009");
bar->SetInputArray(2,"New / Popular 2009");
bar->SetInputArray(3,"Periodical 2009");
bar->SetInputArray(4,"Audiobook 2009");
......
......@@ -109,7 +109,7 @@ int TestStackedPlot(int , char * [])
// Books
stack = vtkPlotStacked::SafeDownCast(chart->AddPlot(vtkChart::STACKED));
stack->SetUseIndexForXSeries(true);
stack->SetInput(table);
stack->SetInputData(table);
stack->SetInputArray(1,"Books");
stack->SetInputArray(2,"New / Popular");
stack->SetInputArray(3,"Periodical");
......
......@@ -55,9 +55,9 @@ void vtkChartHistogram2D::Update()
this->vtkChartXY::Update();
}
void vtkChartHistogram2D::SetInput(vtkImageData *data, vtkIdType z)
void vtkChartHistogram2D::SetInputData(vtkImageData *data, vtkIdType z)
{
this->Histogram->SetInput(data, z);
this->Histogram->SetInputData(data, z);
}
void vtkChartHistogram2D::SetTransferFunction(vtkScalarsToColors *function)
......
......@@ -45,7 +45,7 @@ public:
// Paint function is invoked.
virtual void Update();
virtual void SetInput(vtkImageData *data, vtkIdType z = 0);
virtual void SetInputData(vtkImageData *data, vtkIdType z = 0);
virtual void SetTransferFunction(vtkScalarsToColors *function);
// Description:
......
......@@ -36,19 +36,9 @@ vtkContextMapper2D::~vtkContextMapper2D()
}
//----------------------------------------------------------------------------
void vtkContextMapper2D::SetInput(vtkTable *input)
void vtkContextMapper2D::SetInputData(vtkTable *input)
{
if(input)
{
vtkDebugMacro(<< "Input table set.");
this->SetInputConnection(0, input->GetProducerPort());
}
else
{
// Setting a NULL input removes the connection.
vtkDebugMacro(<< "Null input table set.");
this->SetInputConnection(0, 0);
}
this->SetInputDataInternal(0, input);
}
//----------------------------------------------------------------------------
......
......@@ -39,7 +39,7 @@ public:
// Description:
// Set/Get the input for this object - only accepts vtkTable as input.
virtual void SetInput(vtkTable *input);
virtual void SetInputData(vtkTable *input);
virtual vtkTable * GetInput();
// Description:
......
......@@ -112,7 +112,7 @@ void vtkOpenGL2ContextDevice2D::DrawPointSprites(vtkImageData *sprite,
this->Storage->SpriteTexture = vtkTexture::New();
this->Storage->SpriteTexture->SetRepeat(false);
}
this->Storage->SpriteTexture->SetInput(sprite);
this->Storage->SpriteTexture->SetInputData(sprite);
this->Storage->SpriteTexture->Render(this->Renderer);
}
......
......@@ -283,7 +283,7 @@ void vtkOpenGLContextDevice2D::DrawPointSprites(vtkImageData *sprite,
this->Storage->SpriteTexture = vtkTexture::New();
this->Storage->SpriteTexture->SetRepeat(false);
}
this->Storage->SpriteTexture->SetInput(sprite);
this->Storage->SpriteTexture->SetInputData(sprite);
this->Storage->SpriteTexture->Render(this->Renderer);
}
......@@ -893,7 +893,7 @@ void vtkOpenGLContextDevice2D::SetTexture(vtkImageData* image, int properties)
{
this->Storage->Texture = vtkTexture::New();
}
this->Storage->Texture->SetInput(image);
this->Storage->Texture->SetInputData(image);
this->Storage->TextureProperties = properties;
this->Storage->Texture->SetRepeat(properties & vtkContextDevice2D::Repeat);
this->Storage->Texture->SetInterpolate(properties & vtkContextDevice2D::Linear);
......
......@@ -214,20 +214,20 @@ vtkStdString vtkPlot::GetLabel(vtkIdType index)
}
}
//-----------------------------------------------------------------------------
void vtkPlot::SetInput(vtkTable *table)
void vtkPlot::SetInputData(vtkTable *table)
{
this->Data->SetInput(table);
this->Data->SetInputData(table);
this->AutoLabels = 0; // No longer valid
}
//-----------------------------------------------------------------------------
void vtkPlot::SetInput(vtkTable *table, const vtkStdString &xColumn,
const vtkStdString &yColumn)
void vtkPlot::SetInputData(vtkTable *table, const vtkStdString &xColumn,
const vtkStdString &yColumn)
{