Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
VTK and Python 3 support in fvtk #854
It looks like the soon to be released VTK 7 finally supports Python 3! However,
I ran many examples and the tests for VTK7 from the current release branch and things are looking pretty good. I propose a few minor fixes (mostly related to Python 3, not VTK 7) in #853
I only got two test failures with VTK 7 / Python 3.4:
That one is avoided via b99d107
However I am not sure what is causing the issue in this one:
The images produced look like this:
Actually, I guess
These are the CMake flags I had set at compile time. I can provide a conda build recipe if interested.
Hi @grlee77 thank you again for your excellent feedback. First I would like to say that I am very excited about having Python 3 support in VTK that was the only dependency we had in Dipy that was not Python 3 compatible. We need to update our docs.
Second, the formely known fvtk module is being slowly replaced with the new dipy.viz system. Have a look at the visualization section of http://nipy.org/dipy/examples_index.html#visualization
Now about the order transparency issue. This has been a nightmare for debugging. Order transparency in VTK is very unstable and it depends mostly on the type of the card that you have and what opengl features are supported in your card. There is a large number of extensions that allow for fast order transparency which is what we are trying to support here. There is an alternative but it will make the code much more complicated. So, for now we are planning to support only that and hope that the VTK guys will make it more stable.
Now, if that ordered transparency stopped working only when you switched to Python 3/VTK 7 but it was working on Python 2.7 on the same machine we definitely need to report it to the VTK developers. I am happy to help if this is the case.
Hi @Garyfallidis, I am not sure if the same transparency problem is also present in VTK6/Python 2.7. I may be able to check later this week.
It seems that VTK7 uses a newer "OpenGL2" backend by default which has some differences in the volume rendering methods that are implemented. The following file indicates which classes will be present depending on various build flags:
I am not currently using the volume rendering code, but only some of the point and tube plotting functionality (I was actually making some visualizations of 3D non-Cartesian k-space trajectories unrelated to diffusion imaging!). Matplotlib 3D plotting leaves much to be desired and
Anaconda already has a VTK 6.3 package for Python 2.7, so it was easy to test against that. The result is that
I don't know enough to say whether this is a VTK 7 bug or if it could be due to some differences in compilation flags.