Ah, I see the distinction - thanks @dgobbi .
My goal is to understand how data flows between VTK pipeline elements. Now thanks to you I see how I can inspect my TopoGridReader::GetOutput() for vtkPolyData.
A vtkElevationFilter object is next in the pipeline:
elevFilter->SetInputConnection(gridReader_->GetOutputPort());
elevFilter_->SetScalarRange(low, high);
// Feed elevFilter output to surfaceMapper
surfaceMapper->SetInputConnection(elevFilter->GetOutputPort());
How can I inspect the output of the vtkElevationFilter? I tried:
polyData = pipeline->elevFilter_->GetPolyDataOutput();
polys = polyData->GetPolys();
if (polys) {
qDebug() << "#cells in elevFilter: " << polys->GetNumberOfCells();
}
else {
qDebug() << "no polys in elevFilter output";
}
points = polyData->GetPoints();
if (points) {
qDebug() << "#points in elevFilter: " << points->GetNumberOfPoints();
}
else {
qDebug() << "no points in elevFilter output";
}
But the debug output is:
#cells in elevFilter output: 0
no points in elevFilter output
But my VTK app displays the elevation data as I expect, so obviously data is flowing through the pipeline. What am I missing?