[Insight-users] Convert VTK image to ITK image

Karl Diedrich karl.diedrich at azeresearch.com
Wed Feb 1 13:53:33 EST 2012


Hello,

I am trying to use itk::VTKImageToImageFilter to to convert a VTK image to
an ITK image.
The call vtkImageToImageFilter->Update(); never returns but there is no
error message and program simply stops.

vtkImageData* vtkInput;


        typedef itk::Image<float, 3> ImageType;

        typedef itk::VTKImageToImageFilter<ImageType> VTKImageToImageType;

        typename VTKImageToImageType::Pointer vtkImageToImageFilter =
VTKImageToImageType::New();
        QLOG_DEBUG() << "Prepared Filter";
        vtkImageToImageFilter->SetInput(vtkInput);
        QLOG_DEBUG() << "Set input to filter";
        vtkImageToImageFilter->Update();
        QLOG_DEBUG() << "Updated filter";
        typename ImageType::ConstPointer itkOutput =
vtkImageToImageFilter->GetOutput();
        QLOG_DEBUG() << "Got output";




-- 
Karl Diedrich, Ph.D.
Principal Engineer
----------------------------------------
AZE Research and Development
1 Broadway, 14th floor
Cambridge, MA 02142
Tel: +1 (617) 475-1502
Cell: +1 (801) 350-1251
www.azeofamerica.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120201/d7e08f94/attachment.htm>


More information about the Insight-users mailing list