[Insight-users] Python Numeric requirement
Luis Ibanez
luis.ibanez at kitware.com
Thu May 27 18:33:36 EDT 2004
Hi Charl,
Nope, the intention is not to make it a hard requirement.
It should be just optional. The idea is to make possible
to take the buffer from an ITK image and pass it to a
Python array, and viceversa.
What we want to be able to write is something like
reader = itkImageFileReaderUC2_New()
reader.SetFileName("toto.png")
reader.Update()
connector = itkPyBufferUC2_New()
parr = connector.GetArrayFromImage( reader.GetOutput() )
and
writer = itkImageFileWriterUC2_New()
writer.SetFileName("tata.png")
writer.SetInput( connector.GetImageFromArray( parr ) )
writer.Update()
The itkPyBuffer class is now under
Insight/Wrapping/CSwig/Common
We are still working out some configuration issues...
I'm affraid that by misunderstanding I was taking numeric
as the most recent package. Thanks for the correction,
we will change the CMakeLists.txt file for looking for
"numarray" instead of "numeric". That means that the
internal code of itkPyBuffer will have to change too.
Thanks for pointing this out.
Luis
------------------------
Charl P. Botha wrote:
> Dear list,
>
> Is the Python Numeric package now a hard requirement when building ITK
> with the Python wrappings (it seems so judging by the relevant
> CMakeLists.txt)? From looking at the web page[1], it also seems that
> the numeric package is being phased out in favour of numarray, a new
> implementation. This might be something to take into account.
>
> Any more information with regards to this would be much appreciated!
>
> Thanks,
> Charl
>
> [1] http://www.pfdubois.com/numpy/
>
More information about the Insight-users
mailing list