[ITK-users] problem using VTKImageToImageFilter

Iyas Hamdan iyas.hamdan at gmail.com
Thu Nov 13 06:30:46 EST 2014


Hi everyone!
I'm trying to read two DICOM series with VTK, and then register those two
volumes using ITK, so in this contexte I would have to convert the
vtkImageData into itk::Image.

What i'm doing is the following:

typedef itk::Image< signed short, 3> ImageType;
typedef itk::VTKImageToImageFilter< ImageType >  VTKImageToImageFilterType;
VTKImageToImageFilterType::Pointer connector =
VTKImageToImageFilterType::New();
connector->SetInput(ImageVTK);
connector->Update();

Where ImageVTK is my 3D volume and I visualized it so its reading the Dicom
series correctly.

But I'm always getting this error when I reach the update():
VTKImageToImageFilter: Input scalar type is float but should be short.

So what am I doing wrong here ?

thanks in advance,

Iyas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20141113/33fd54fa/attachment.html>


More information about the Insight-users mailing list