Python vtk: vtkImageImport method SetDataDirection() is not available in python vtk 8.2.0

Hi Team,

I have been trying to set the data direction for some volumes in vtkImageImport in python. The issue I am facing is that it’s not possible to access the method Set/GetDataDirection for the object of the type vtkImageImport.

Alternatively, I tried image_import.GetOutput().SetDataMatrix(dir_matrix) to do the same. This also isnt captured in the python API. When trying dir(image_import) i.e. to see the attributes and methods of the object in python, these methods were not listed.

Am I missing something here? How do I go about this? (didn’t know if this was a bug, or the python API had limited coverage)

Environment: Windows 10
vtk: 8.2.0
Python: 3.6 Anaconda (conda package manager)

Thanks! :slight_smile:

Hi Vipul,

Alexis developed this feature after VTK 8.2. Thus until VTK 9.0.0 comes out it is only available in the master branch.

hth

Hi Dave,

Thank you for the response. I will keep an eye on further developments.

Vipul