<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>Hi. i'm starting to 
use itk using the python bindings. i'm running into an error when using the 
ImportImageFilter and setting the image data. From vtk, i though that this could 
be a string and that i could use the "tostring()" function of arrays, but that 
doesn't seem to be the case:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; iimport = 
itk.itkImportImageFilterF3_New()<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iimport.SetRegion( region )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iimport.SetOrigin( origin )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iimport.SetSpacing( spacing )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
iimport.SetImportPointer( self.data.tostring(), prod, True )</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>the error 
is:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>&nbsp;&nbsp;&nbsp; 
iimport.SetImportPointer( self.data.tostring(), prod, True )<BR>&nbsp; File 
"itkImportImageFilter.py", line 530, in SetImportPointer<BR>TypeError: Type 
error. Got , expected _p_float</DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>i'm not sure what 
data the SetImportPointer needs. I've tried to use the SwigExtras.FArrayClass 
but i get the same problem there setting the data in the frompointer 
function.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>Does anybody have 
experience with this?&nbsp; </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=592093308-25102006></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>thx for your 
help,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV align=left><FONT face=Arial size=2>alex<BR></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>