[vtkusers] Re: vtkWarpVector errors when NULL input is checked

Charl P. Botha cpbotha at gmail.com
Fri May 20 05:36:42 EDT 2005


Hmmm, I just read some more...

On 5/20/05, Charl P. Botha <cpbotha at gmail.com> wrote:
> ERROR: In /home/cpbotha/DoNotBackup/build/VTK/Filtering/vtkExecutive.cxx,
> line 265
> vtkStreamingDemandDrivenPipeline (0x830d1e0): Attempt to get executive
> for connection index 0 on input port 0 of algorithm
> vtkWarpVector(0x81a2920), which has 0 connections.

Seems I'm supposed to use GetNumberOfInputConnections(0) to check
whether anything's been connected to the input port.

> c.GetOutput() yields the following:
> ERROR: In /home/cpbotha/DoNotBackup/build/VTK/Filtering/vtkExecutive.cxx,
> line 652

... and here one should rather use c.GetOutputPort(0) and connect that
to the next filter with nextFilter.SetInputConnection(idx,
c.GetOutputPort(0)).

But still, is it expected behaviour that checking for the NULLness of
GetOutput() generates an error?  I realise that the new way is better,
but the old way _was_ quite convenient.

Thanks,
Charl

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list