[vtkusers] check for pipeline without input data?
Maarten Beek
beekmaarten at yahoo.com
Thu Oct 9 12:28:26 EDT 2014
Hi all,
Is there a way to check whether a vtk pipeline has data to render? Many VTK algorithms display an error when they don't have input data. And these errors are harmless (don't crash the app), I would like to avoid them.
I currently am doing this as follows:
vtkMapper* mapper = actor->GetMapper();
if( 0 < mapper->GetTotalNumberOfInputConnections() &&
0 < mapper->GetInputAlgortihm(0,0)->GetTotalNumberOfInputConnections() &&
0 < mapper->GetInputAlgortihm(0,0)->GetInputAlgortihm(0,0)->GetTotalNumberOfInputConnections() &&
.... )
{
actor->VisibilityOn()
}
else
{
actor->VisibilityOff();
}
One can easily imagine I would like to have a more convenient if statement, because currently I need to know exactly how long the pipeline is.
For those interested:
This issue pops up, when when the rendering pipeline is created at the beginning a running the app, before the data is loaded Or when the data is unloaded in order to load new data.
Thank - Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141009/9516244e/attachment.html>
More information about the vtkusers
mailing list