array_from_vtkmatrix

array_from_vtkmatrix(matrix)

Convert a vtk matrix to an array.

Parameters
matrixvtk.vtkMatrix3x3 or vtk.vtkMatrix4x4

The vtk matrix to be converted to a numpy.ndarray. Returned ndarray has shape (3, 3) or (4, 4) as appropriate.

Returns
numpy.ndarray

Numpy array containing the data from matrix.