[vtkusers] how to handle an empty pipeline?
Langer, Stephen A. (Fed)
stephen.langer at nist.gov
Wed Oct 18 11:03:56 EDT 2017
Thanks for the suggestion, but it won't work in this case. The warning messages come from a vtkDataSetSurfaceFilter that's created as a protected member of the vtkDataSetMapper class, so I can't call vtkDataSetSurfaceFilter::AddObserver. Subclassing vtkDatatSetMapper and overriding Render to get access to the filter would work, but feels wrong…
Is this a bug? A warning is raised when the input to the vtkDataSetMapper is empty, except when the input type is VTK_POLY_DATA.
-- Steve
On 10/17/17, 6:36 PM, "Bill Lorensen" <bill.lorensen at gmail.com> wrote:
You can catch the warnings/errors like this:
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Florensen.github.io%2FVTKExamples%2Fsite%2FCxx%2FUtilities%2FObserveError%2F&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=Jse9qOUuZCUa9o7yU3%2FLH2HH5I0%2FlkyeL2DtyHoPjCU%3D&reserved=0
On Tue, Oct 17, 2017 at 2:34 PM, Langer, Stephen A. (Fed)
<stephen.langer at nist.gov> wrote:
> Hi --
>
> What's the right way to handle a pipeline that might at times have no data in it? I'm connecting to a vtkDataSetMapper, and if the input stream is empty vtk prints a warning "vtkDataSetSurfaceFilter: Number of cells is zero, no data to process". I don't create the vtkDataSetSurfaceFilter myself -- it's been inserted into the pipeline by the mapper. It doesn't do that if the input data is poly data, and if I change the input to poly data, the mapper seems quite happy with the empty pipeline, so it's odd that it complains in one case but not the other.
>
> Is there something that I should do at the pipeline source to tell the pipeline not to run? Is there a way to suppress just this one warning message?
>
> I'm using vtk 7.1.1 in C++.
>
> Thanks.
> -- Steve
>
> _______________________________________________
> Powered by https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=RYg%2BPlwic7Tna%2F7XBHOzzdvhkoMlxxumVNKWqExIbgs%3D&reserved=0
>
> Visit other Kitware open-source projects at https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=alDmSCFYyHNTCJSBl%2FfPxBQUcuQ3wtlxy%2BJkCEKzZJo%3D&reserved=0
>
> Please keep messages on-topic and check the VTK FAQ at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=YS8KxC6fI9R%2B5fACCQbDC7N3eBbFj8qy1k2SIFz%2B%2FBM%3D&reserved=0
>
> Search the list archives at: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=SYRMsiT14ntcdMMbSsGahJCJavp8%2BJFOrqx%2B2x4QJ1A%3D&reserved=0
>
> Follow this link to subscribe/unsubscribe:
> https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Cstephen.langer%40nist.gov%7C42ff580323ed40df553608d515af87f8%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438765996499743&sdata=uPalP%2BrHte%2FjsQeaMUBuxCuAOY7vv2Eye5aZHbxhIY0%3D&reserved=0
--
Unpaid intern in BillsBasement at noware dot com
More information about the vtkusers
mailing list