<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Bookman Old Style">Hi,</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">I use itkVTKImageToImageFilter to convert
itkImage to vtkImage.</FONT></DIV>
<DIV><FONT face="Bookman Old Style"></FONT> </DIV>
<DIV><FONT face="Bookman Old Style">typedef
itk::VTKImageToImageFilter<ImageType_Short>
VTKToITKConnectorType;</FONT></DIV>
<DIV><FONT face="Bookman Old Style"> </DIV>
<DIV>VTKToITKConnectorType::Pointer connector =
VTKToITKConnectorType::New();</DIV>
<DIV> </DIV>
<DIV>connector->SetInput(testVtkImage);</DIV>
<DIV> </DIV>
<DIV> try<BR> { <BR> connector ->Update();<BR> }<BR> catch(
itk::ExceptionObject & excp
)<BR> {<BR> std::cerr
<< "Error reading the series " <<
std::endl;<BR> std::cerr << excp
<< std::endl;<BR> }</DIV>
<DIV> </DIV>
<DIV>ImageType_Short::Pointer testItkImage = connector->GetOutput();</DIV>
<DIV> </DIV>
<DIV>However, the error is:</DIV>
<DIV> </DIV>
<DIV>error C2679: binary '=' : no operator defined which takes a right-hand
operand of type 'const class itk::Image<short,3> *' (or there is no
acceptable conversion)</DIV>
<DIV> </DIV>
<DIV>How to convert itk::Image<short,3> * to itk::Image<short,3>
::Pointer?</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV> </DIV>
<DIV>Yixun<BR></DIV>
<DIV> </DIV>
<DIV><BR> </DIV></FONT></BODY></HTML>