MantisBT - VTK
View Issue Details
0003586VTK(No Category)public2006-08-05 16:572016-08-12 09:54
Charl Botha 
Brad King 
highminoralways
closedmoved 
 
 
0003586: vtkImageDifference segfaults when images are of unequal size
vtkImageDifference will segfault if SetImage() and SetInputConnection() are used for the two inputs, and the SetImage() input is smaller than the SetInputConnection() input.
No tags attached.
? vtkImageDiff_is_broken.py (1,003) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5616/vtkImageDiff_is_broken.py
png file_790x528.png (63,877) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5617/file_790x528.png
png

png file_790x541.png (64,441) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5618/file_790x541.png
png

cxx imgdif.cxx (1,102) 1969-12-31 19:00
https://www.vtk.org/Bug/file/5670/imgdif.cxx
Issue History
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2016-08-12 09:54Kitware RobotNote Added: 0036883
2016-08-12 09:54Kitware RobotStatusexpired => closed
2016-08-12 09:54Kitware RobotResolutionopen => moved

Notes
(0004627)
Charl Botha   
2006-08-05 16:59   
I've attached a commented Python example and two input images so that you can reproduce the bug. When one uses the SetInput(0,) and SetInput(1,) form, there doesn't seem to be a problem.

(0004628)
Charl Botha   
2006-08-05 17:19   
Cancel that. It segfaults with SetInput(0,) and SetInput(1,) as well, when the SetInput(0,) image is larger than the SetInput(1,) image.

Change the two relevant lines to:
idiff.SetInput(0, ec1.GetOutput())
idiff.SetInput(1, ec2.GetOutput())
in the attached example to see this.
(0004946)
Mathieu Malaterre   
2006-09-17 08:10   
Using:

idiff.SetInput(0, ec1.GetOutput())
idiff.SetInput(1, ec2.GetOutput())

I cannot reproduce the bug (VTK5, VTK CVS), going back to original version.

ERROR: In /home/mathieu/Dashboards/MyTests/VTK5/Imaging/vtkImageDifference.cxx, line 395
vtkImageDifference (0x805f6f8): ExecuteInformation: Input are not the same size.
 Input1 is: 0,789,0,527,0,0
 Input2 is: 0,789,0,540,0,0

(0004947)
Mathieu Malaterre   
2006-09-17 08:28   
Adding cxx version.
(0004948)
Mathieu Malaterre   
2006-09-17 08:29   
Removing ->Update on the png reader solve symptom. Adding ->Update on the imgextract solve the symptom...
Leaving the bug open until issue is actually fixed
(0036883)
Kitware Robot   
2016-08-12 09:54   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.