[vtkusers] vtkMergeDataObjectFilter broken?

Chris Want cwant at ualberta.ca
Tue Sep 12 17:07:49 EDT 2006


Hi there,

I am trying to update some code that I wrote ages
ago that works fine with VTK 4.x, but breaks with
current CVS. I am storing geometry and scalar
data in different files and I'm using the
vtkMergeDataObjectFilter to help combine them.
The particular code looks something like this:

//-------------
vtkMergeDataObjectFilter *merge = vtkMergeDataObjectFilter::New();
vtkUnstructuredGridReader *readGeom = vtkUnstructuredGridReader::New();
readGeom->SetFileName(geomfilename);

readAttr = vtkDataObjectReader::New();
readAttr->SetFileName(datafilename);
readAttr->SetFieldDataName("scalarvar");

// # combine data and build scalars
merge->SetInput((vtkDataSet *) readGeom->GetOutput());
merge->SetDataObject(readAttr->GetOutput());
//-------------

When it hits the last line of code, VTK says:

ERROR: In /usr/local/src/vtk/VTK/Filtering/vtkAlgorithm.cxx, line 679
vtkMergeDataObjectFilter (0x523820): Attempt to connect input port index 
1 for an algorithm with 1 input ports.

I just downloaded and built VTK 4, and the code runs fine
-- can anybody suggest a reason why it fails with recent
CVS?

Cheers,
Chris

-- 
  ____________________________________________________________________
( Chris Want                                                         )
( Research Computing Support                                         )
( Academic Information and Communication Technologies (AICT)         )
( University of Alberta                                              )
( Tel: 1-780-492-9418                                                )
  --------------------------------------------------------------------




More information about the vtkusers mailing list