[vtkusers] error when connecting ITK with VTK

Ralf.Denhof ralf.denhof at gmx.de
Sun Dec 4 13:11:36 EST 2011


Hello together,

today I got an error and I do not know why:

ERROR: In C:\APIs\VTK\vtk-5.8.0\Imaging\vtkImageImport.cxx, line 338
vtkImageImport (0000000003395080): Calling UpdateInformationCallback: 
c:\apis\itk\insighttoolkit-3.20.0\code\basicfilters\itkVTKImageImport.txx:241:
itk::ERROR: VTKImageImport(00000000034AB3E0): Input number of components 
is 4 but should be 1

ERROR: In C:\APIs\VTK\vtk-5.8.0\Filtering\vtkImageData.cxx, line 1460
vtkImageData (0000000003441EB0): GetScalarPointer: Pixel (0, 0, 0) not 
in memory.
  Current extent= (0, -1, 0, -1, 0, 0)

All I do is the following:
I use the itkImageToVTKImageFilter to get VTK connected with ITK (input 
is the input of a vtkImageActor). I remebered something about the image 
types, so I casted the input before connecting, but no change. The type 
is unsigned char with two dimensions.

Does anybody have suggestions?

Ralf



More information about the vtkusers mailing list