[vtkusers] vtkImageExportToArray.py Bug

Mathieu Malaterre mathieu.malaterre at kitware.com
Mon Oct 9 10:56:04 EDT 2006


toon Huysmans wrote:
> Hi Luis,
> 
> I think there is a bug in 
> VTK/Wrapping/Python/vtk/util/vtkImageExportToArray.py: it does not work 
> for images which have a datatype length different from 1 byte.
> 
> The changed lines are marked with #####:
> 
> def GetArray(self):
>       ...
>        if (numComponents > 1):
>            dim = dim + (numComponents,)
>        size = dim[0]*dim[1]*dim[2]*numComponents  #####
> 
>        if _NEW_NUMERIC:
>            imArray = Numeric.zeros((size,),self.__typeDict[type])  #####
>            self.__export.Export(imArray)
>       ...
> 
> the problem was that an imArray was located always of the type 
> Numeric.UnsignedInt8!


Toon,

	Please submit this as a bug at:

	http://vtk.org/Bug

Thx
Mathieu



More information about the vtkusers mailing list