[vtk-developers] SetInput fails?

Tim Peeters thjmpeeters at gmail.com
Fri May 28 15:01:59 EDT 2010


Another correction:

vtkDataObject* eigenIn = eigen->GetInput();

so the problem is not in the casting of the data. The GetInput()
function really returns NULL.

Tim.

On Fri, May 28, 2010 at 20:59, Tim Peeters <thjmpeeters at gmail.com> wrote:
> Sorry I partially gave you the wrong code. It should be this:
>
> vtkTensorToEigensystemFilter* eigen = vtkTensorToEigensystemFilter::New();
> // dti is a valid vtkImageData object
> eigen->SetInput(dti);
> vtkImageData* eigenIn = eigen->GetInput();
> // eigenIn == NULL
>
> eigen->Update() fails because the filter does not have an input connection :s.
> It really puzzles me because I call SetInput(..) with a valid dataset,
> and this function calls the SetInputConnection() function of the
> filter. But after that I get lost in pipelines and Executives and have
> not been able to find out what goes wrong.
>
> Tim.
>
>
> On Fri, May 28, 2010 at 20:55, Jeff Baumes <jeff.baumes at kitware.com> wrote:
>> On Fri, May 28, 2010 at 2:53 PM, Tim Peeters <thjmpeeters at gmail.com> wrote:
>>> Dear developers,
>>>
>>> I am developing a VTK-based application that uses a plug-in system to
>>> add functionality to the core system.
>>> I am loading plug-ins (which are loaded as DLL's on Windows) using the
>>> Qt plugin system.
>>>
>>> The following code, in one of the plugins, fails:
>>>
>>> vtkTensorToEigensystemFilter* eigen = vtkTensorToEigensystemFilter::New();
>>> // dti is a valid vtkImageData object
>>> eigen->SetInput(dti);
>>> vtkImageData* eigenOut = eigen->GetOutput();
>>> // eigenOut == NULL
>>
>> You are missing eigen->Update(), which will actually run your filter,
>> before you get the output.
>>
>



More information about the vtk-developers mailing list