View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003772VTK(No Category)public2006-09-14 19:492011-01-13 17:00
ReporterChris Want 
Assigned ToMathieu Malaterre 
PrioritylowSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0003772: vtkMergeDataObjectFilter broken?
DescriptionHi 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.
TagsNo tags attached.
Project
Type
Attached Filesgz file icon bug.tar.gz [^] (231,649 bytes) 1969-12-31 19:00

 Relationships

  Notes
(0004951)
Mathieu Malaterre (developer)
2006-09-17 11:03

fixed in CVS

$ cvs ci -m"BUG: Fix Bug 0003772 - vtkMergeDataObjectFilter broken. Thanks to Chris Want for bug report. Some STYLE fix"
/cvsroot/VTK/VTK/Graphics/vtkBlankStructuredGridWithImage.cxx,v <-- vtkBlankStructuredGridWithImage.cxx
new revision: 1.13; previous revision: 1.12
/cvsroot/VTK/VTK/Graphics/vtkMergeDataObjectFilter.cxx,v <-- vtkMergeDataObjectFilter.cxx
new revision: 1.23; previous revision: 1.22
/cvsroot/VTK/VTK/Graphics/vtkTensorGlyph.cxx,v <-- vtkTensorGlyph.cxx
new revision: 1.59; previous revision: 1.58
(0004952)
Mathieu Malaterre (developer)
2006-09-17 11:03

Fixed in VTK 5.x branch.
$ cvs ci -m"BUG: Backport from CVS to fix filter number of input ports" Graphics/vtkMergeDataObjectFilter.cxx
/cvsroot/VTK/VTK/Graphics/vtkMergeDataObjectFilter.cxx,v <-- vtkMergeDataObjectFilter.cxx
new revision: 1.21.12.1; previous revision: 1.21

 Issue History
Date Modified Username Field Change
2011-01-13 17:00 Source_changeset_attached => VTK master a2bd8391
2011-01-13 17:00 Source_changeset_attached => VTK master 020ef709
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team