[vtk-developers] Which class to derive from for filter with input: PolyData, output: Graph

David Doria daviddoria+vtk at gmail.com
Wed Nov 25 15:16:02 EST 2009


> Try debugging a bit further to see exactly the request type that is
> failing. e.g. you can put a breakpoint in
> vtkGraphAlgorithm::ProcessRequest() to see which type of requests are
> happening and which one fails (returns 0).
>
> Jeff
>

You'll have to excuse my new-ness on this one, I've never dug down
into the real workings of the pipeline.

It seems that vtkGraphAlgorithm::ProcessRequest is calling with
REQUEST_DATA_OBJECT rather than REQUEST_DATA as is usually the case in
filters that I have derived from vtkPolyDataAlgorithm. What is the
difference between these?

Now that I have overriden RequestDataObject (with
vtkNearestNeighborGraph::RequestDataObject), the cast of the output to
a vtkGraph seems to be the part that is failing:
  vtkGraph* output = vtkGraph::SafeDownCast(

outInfo->Get(vtkDataObject::DATA_OBJECT()));

output is invalid after this cast. Any hints on why that would be? The
output should be a vtkGraph by definition of vtkGraphAlgorithm, right?

Here is the latest version:
http://rpi.edu/~doriad/VTK_List/vtkNearestNeighborGraph/

Any pointers are much appreciated!

Thanks,

David



More information about the vtk-developers mailing list