[vtkusers] SetInput and SetInputConnection

David Doria daviddoria+vtk at gmail.com
Tue Jul 13 13:12:20 EDT 2010


On Tue, Jul 13, 2010 at 12:29 PM, Prashanth
<prashanth.dumpuri at vanderbilt.edu> wrote:
> All,
>   I wrote a class in 2004 that was derived from vtkPolyDataSource. My
> class accepts vtkPolyData as an Input, processes it and outputs a
> vtkPolyData. The class worked fine in VTK 4.x. We recently migrated to
> VTK 5.x and the class is not working. I get the following error
> message:
>
>  "Attempt to get input information vector from input port index 0 for
> algorithm vtkMyClass(0x622a50), which has 0 input ports."
>
> So to fix that in the Constructor of the class, I defined the
> NumberOfInputPorts to 1, set the NumberOfInput Connections to 1 on the 0th
> port and have also filled the input port information on the 0th port using
> the input vtkPolyData. I now get a Segmentation fault with no
> error/warning/debug messages.
>
> I know I'm missing something with regards to the change in the VTK
> pipeline. Any help and suggestions will be greatly appreciated.
>
> Thanks
> Prashanth

Maybe you can take a look at this:

http://www.vtk.org/Wiki/VTK/Examples/Developers/vtkPolyDataAlgorithm_Filter

And see if you can tell what changed? If not, I'm sure someone will be
able to help you directly. Maybe you can post a shell of your class
code (preferably compilable) that produces the error?

Thanks,

David



More information about the vtkusers mailing list