[ITK-users] problem using VTKImageToImageFilter

Bill Lorensen bill.lorensen at gmail.com
Thu Nov 13 08:14:56 EST 2014


It is telling you that the VTK image is float. Try printing the vtk image
ImageVTK->Print(std::cout);


On Thu, Nov 13, 2014 at 6:30 AM, Iyas Hamdan <iyas.hamdan at gmail.com> wrote:
> 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
>
> _____________________________________
> 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
>



-- 
Unpaid intern in BillsBasement at noware dot com


More information about the Insight-users mailing list