[vtkusers] Derive from vtkGraphAlgorithm
Yang, Jinzhong
jinzhong76 at gmail.com
Tue Oct 18 11:29:53 EDT 2011
Hi All,
I was trying to implement a class deriving from vtkGraphAlgorithm. I used
the vtkBoostbreadthFirstSearch as the template for my implementation;
however, I did not implement the FillInputPortInformaiton and
FillOutputPortInformation. However, when I tested my code, I got the
following error message:
ERROR: In ..\..\source\Filtering\vtkExecutive.cxx, line 757
vtkStreamingDemandDrivenPipeline (01965648): Algorithm
vtkUndirectedGraphCPP(01963930) returned failure for request: vtkInformation
(01965E08)
Debug: Off
Modified Time: 23
Reference Count: 1
Registered Events: (none)
Request: REQUEST_DATA_OBJECT
ALGORITHM_AFTER_FORWARD: 1
FORWARD_DIRECTION: 0
The following is the testing code to call my implemented class
vtkUndirectedGraphCPP:
vtkUndirectedGraphCPP * cpp = vtkUndirectedGraphCPP::New();
cpp->SetInput(g);
cpp->SetOriginVertex(0);
cpp->SetEdgeCostArrayName("weights");
cpp->Update();
Here g is a vtkMutableUndirectedGraph. I did a little bit search and found
that I should overwrite RequestDataObject instead of RequestData. This would
be quite different from other implementations in vtk. Could anybody help to
solve this problem? My VTK version is 5.4.2.
Thanks,
Jinzhong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111018/536a9dc2/attachment.htm>
More information about the vtkusers
mailing list