[vtk-developers] SetInput fails?

Tim Peeters thjmpeeters at gmail.com
Fri May 28 14:53:49 EDT 2010


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


vtkTensorToEigensystemFilter is a subclass of
vtkSimpleImageToImageFilter which basically only implements the
SimpleExecute() function and thus does not change the {Get,Set}Input()
function(s). Since eigenOut == NULL, I assume that SetInput or
GetOutput() fails, and I have been debugging but I get lost in the VTK
pipeline and I cannot trace back the error. In a different place I use
vtkExtractVOI in a similar way as vtkTensorToEigenSystemFilter, and I
get the same problem.

dti is a vtkImageData that is constructed in a different plugin and is
the output of a reader. All the functions used to work in one "big"
application that did not use plugins, but now it fails in MSVC2008
express on Windows. I usually do my development on Linux (Ubuntu and
Slackware), and with GCC on Linux everything works fine. On Windows,
different parts of the pipeline are built in different dll's
(plugins), but the image data (dti) and its producer port seem to be
consistent in the plugin that creates the dti dataset and the plugin
that uses it.

Does anyone have any clues how I can track where this problem comes from?

Thanks a lot!
Tim.



More information about the vtk-developers mailing list