[vtkusers] Source derived from vtkAlgorithm

David Doria daviddoria+vtk at gmail.com
Sat Nov 28 17:33:50 EST 2009


On Sat, Nov 28, 2009 at 1:37 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:

> David,
>
>  find . -name \*.h -exec grep vtkAlgorithm {} /dev/null \; | grep public
>
> shows 40 classes that derive from vtkAlgorithm. Two of these are
> source's. Maybe one of them will help.
>
> Bill
>
>
Bill,

I spent quite a while paring some of those down and combining them trying to
get the desired functionality. However, I'm still having some issues. The
pipeline code gets pretty complex in a big hurry.

Here is the latest attempt:
http://www.rpi.edu/~doriad/VTK_List/vtkAlgorithmSource/<http://www.rpi.edu/%7Edoriad/VTK_List/vtkAlgorithmSource/>

It compiles, but when it is run I get

NewDataObject(): You are trying to instantiate DataObjectType "vtkTest"
which does not exist.

Another thing is that in RequestData() when I do this :

  vtkInformation* info = outputVector->GetInformationObject(0);

  vtkTest *output =
      vtkTest::SafeDownCast(info->Get(vtkDataObject::DATA_OBJECT()));

output is NULL. If I do
output = vtkTest::New();

then the algorithm no longer has the correct address for the output, right?
How is this typically handled?

It's very tough to debug these things as a non-expert because they are all
errors from deep down in the pipeline.

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091128/b879222a/attachment.htm>


More information about the vtkusers mailing list