<!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> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=592093308-25102006> iimport =
itk.itkImportImageFilterF3_New()<BR>
iimport.SetRegion( region )<BR>
iimport.SetOrigin( origin )<BR>
iimport.SetSpacing( spacing )<BR>
iimport.SetImportPointer( self.data.tostring(), prod, True )</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=592093308-25102006></SPAN></FONT> </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> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>
iimport.SetImportPointer( self.data.tostring(), prod, True )<BR> 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> </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> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=592093308-25102006>Does anybody have
experience with this? </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=592093308-25102006></SPAN></FONT> </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> </DIV>
<DIV align=left><FONT face=Arial size=2>alex<BR></DIV></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV></BODY></HTML>