[vtkusers] How to handle inputs that might no provide data for particular time steps?

Vanmoer, Mark W mvanmoer at illinois.edu
Fri Mar 21 16:13:46 EDT 2014


If anyone comes across a similar need, found a more obvious check:
if (input1->GetNumberOfPoints() == 0 )

From: vtkusers [mailto:vtkusers-bounces at vtk.org] On Behalf Of Vanmoer, Mark W
Sent: Friday, March 21, 2014 12:25 PM
To: vtkusers at vtk.org
Subject: [vtkusers] How to handle inputs that might no provide data for particular time steps?

Hi, I have a filter that takes two inputs, one of which may, for particular time steps, not produce any data. E.g., a threshold filter applied to a source, where the inputs to the threshold may cause the threshold to produce nothing for a few steps. Then that input into my filter will be zero, which my filter can ignore, but it needs to check to make sure I don't try to process on that time step.

What's the recommended way to check that the threshold is producing no actual output? Right now I'm checking if the number of scalar tuples is 0

if (input1->GetPointData()->GetScalars()->GetNumberOfTuples() == 0)

and it works, but I was wondering if I was missing something more obvious.

Thanks,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140321/ae037df1/attachment.html>


More information about the vtkusers mailing list