About using the code of exporting a model with colors to Blender

Hello,
I was trying to use the code of exporting a model with colors to Blender in the repository here: Export a model to Blender, including color
but it seems like the function of GetOutputPolyData has been modified in the new version of VTK. As it keeps giving me an error in the integrator.
Anyone know a way to get its alternative?

Thank you

I’ve fixed the obvious syntax errors (due to VTK library upgrades) in the fiber tract export snippet.

If you export generic models (not fiber tracts) then you can either export the whole scene as VRML or export a colored model to ply.