<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi all,<br><br>I'm having a bit of trouble using the itk::VTKImageToImageFilter class. My program crashes on runtime. The following is a snippet of my code.<br><br>static const unsigned int Dimension = 2;<br>typedef&nbsp; float&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PixelType;<br>typedef itk::Image&lt; PixelType, Dimension &gt;&nbsp; FixedImageType;<br>typedef itk::VTKImageToImageFilter&lt;FixedImageType&gt; VTKImageToITKImageType;<br><br>vtkSmartPointer&lt;vtkImageData&gt; USImage = vtkSmartPointer&lt;vtkImageData&gt;::New();<br>VTKImageToITKImageType::Pointer VTKToITKConnector = VTKImageToITKImageType::New();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>vector&lt;FixedImageType::Pointer&gt; *ImagePanorama;<br>ImagePanorama = NULL;<br>vector&lt;FixedImageType::Pointer&gt;::iterator PanoramaIterator;<br>USImage-&gt;SetScalarTypeToUnsignedChar();<br>USImage-&gt;SetDimensions(960,480,1);<br>USImage-&gt;SetSpacing(1,1,1);<br>USImage = sonixGrabber-&gt;GetOutput();<br>USImage-&gt;Update();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>VTKToITKConnector-&gt;SetInput(USImage);<br>VTKToITKConnector-&gt;Execute();<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>FixedImageType::Pointer ITKImagePointer = FixedImageType::New();<br>ITKImagePointer = VTKToITKConnector-&gt;GetImporter()-&gt;GetOutput();<br>ITKImagePointer-&gt;Update();<br><br>I've isolated the error to the usage of VTKImageToImageFilter. I haven't had any luck finding examples that used this filter. What is the correct pipeline for using this filter? Thank you all in advance.<br><br>Regards,<br>Alexis Cheng<br>University of British Columbia<br>Electrical Engineering<br>                                               </body>
</html>