[vtkusers] How to make a filter operate on either mutable directed or mutable undirected graph

David Doria daviddoria+vtk at gmail.com
Wed Mar 31 13:42:17 EDT 2010


> vtkGraphAlgorithm already implements RequestDataObject to do just what
> you want. It will create the same type of graph on output as in the
> input. The NewInstance() call in
> vtkGraphAlgorithm::RequestDataObject() accomplishes this.
>
> Jeff
>

Jeff,

The problem is that if I don't implement my own RequestDataObject
function, I get

vtkStreamingDemandDrivenPipeline (0x9bd97f8): Algorithm
vtkMeshToGraph(0x9bd92d8) returned failure for request: vtkInformation
(0x9bd9298)

Here is a demo:
http://www.rpi.edu/~doriad/VTK_List/GraphAlgorithm/

If you leave the RequestDataObject code commented, it produces the
above error. If you uncomment it, everything works fine.

Thanks,

David



More information about the vtkusers mailing list