[vtkusers] VTK6.3 runtime crash when using vtkImageData as input for vtkImageAlgorithm
lackodan at outlook.com
Tue Jun 7 10:22:27 EDT 2016
I have another question. I'm using VTK 6.3 in Python 2.7, and every time I try to use an object of type vtkImageData as input for an vtkImageAlgorithm, it crashes, saying "This application has requested the Runtime to terminate it in an unusual way". Here's a minimal example reading and writing a NIFTI-file:
niftiReader = vtk.vtkNIFTIImageReader()
niftiWriter = vtk.vtkNIFTIImageWriter()
# niftiWriter.SetInputConnection(niftiReader.GetOutputPort()) # this works
niftiWriter.SetInputData(niftiReader.GetOutput()) # this causes a crash
The file I'm using can be downloaded here: https://onedrive.live.com/redir?resid=C74503A42DE708!3266&authkey=!AGdR2dDTvYntgYc&ithint=file%2cnii
As far as I understand, niftiReader.GetOutput() returns a vtkImageData (which is a vtkDataObject) and vtkNIFTIWriter.GetInputData() should take a vtkDataObject as input.
Could anyone help me understand what's going on? Please let me know if you need any more info.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtkusers