This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
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?
Attached is a simple python script and two data files that exhibit this problem (works ok with VTK 4 though). The problem also occurs with TCL and C++ programs.