[ITK] [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/community/attachments/20141113/33fd54fa/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list