<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1491" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face="Times New Roman" size=3>Dear all,</FONT></DIV>
<DIV><FONT face="Times New Roman" size=3></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=3>I got a problem about connecting ITK
and VTK. </FONT></DIV>
<DIV><FONT face="Times New Roman" size=3></FONT> </DIV>
<DIV><FONT face="Times New Roman" size=3>I use itk::ImageToVTKImageFilter and
itk::VTKImageToImageFilter for converting data. </FONT></DIV>
<DIV> </DIV>
<DIV> // Connect a ITK pipeline to an VTK pipeline<BR> typedef
itk::ImageToVTKImageFilter< OutputType > ConnectorFilterType;<BR>
ConnectorFilterType::Pointer connector = ConnectorFilterType::New();<BR>
connector->SetInput( caster->GetOutput() ); <FONT
face="Times New Roman">// an image can be created by image writer using
caster->GetOutput() data<BR></FONT>
connector->GetImporter()->SetDataScalarTypeToUnsignedChar();<BR>
this->RegisteredImage = connector->GetOutput(); </DIV>
<DIV> </DIV>
<DIV><FONT face="Times New Roman" size=3>"this->RegisteredImage" is accessed
in vtk pipeline by a get method in another file.</FONT></DIV>
<DIV>vtkImageData *image = registration->GetRegisteredImage();</DIV>
<DIV>image->Update();</DIV>
<DIV> </DIV>
<DIV><FONT face="Times New Roman" size=3>There is an error exception when
running vtkImageData Updata() method, the execution goes into
itkVTKImageExportBase.cxx, and fails at calling UpdataInformationCallback() as
the following.</FONT></DIV>
<DIV> </DIV>
<DIV>void VTKImageExportBase::UpdateInformationCallbackFunction(void*
userData)<BR>{<BR>
static_cast<VTKImageExportBase*>(userData)-><BR>
UpdateInformationCallback(); // failed<BR>}<BR></DIV>
<DIV>I would be grateful if you could help solve this problem, thanks in
advance.</DIV>
<DIV> </DIV>
<DIV>Regards,</DIV>
<DIV> </DIV>
<DIV>Yan</DIV></FONT></DIV></BODY></HTML>