Can VMTK be used when Python has VTK already installed?

119 views
Skip to first unread message

Zbyszek Tyfa

unread,
Aug 15, 2016, 7:22:38 AM8/15/16
to vmtk-...@googlegroups.com
Dear VMTK Users,

I'm a newbie programmer (actually cannot call myself a programmer) and I have a problem with VMTK. I've created a software based on Python and wxPython wrapper as a GUI and I would like to implement some functionalites of VMTK into it (or programatically enable sending data from my software to VMTK), however, major problem arises at this stage.

I have installed python 2.7.x. All modules that I'm working with have been installed through pip-option (was using mainly .whl files), including specific version of VTK. When I installed VMTK, it didn't work (vtkCommonCorePython module not found), however, my script worked. When I copied the vtk folder (from vmtk folder) and pasted it into site-packages (yes, I replaced the former vtk folder), VMTK worked, however, when I launched my program I had an error 'no module vtkCommonCorePython'.

So my question is: how to install VMTK so it works together with a script that uses modules from VTK? If there is an option within VMTK to create a proper file from 3D numpy arrays (in my script I have 3D numpy arrays from which I generate STL file via MarchingCubes), then I can uninstall my current vtk and concentrate mainly on VMTK, but I haven't found anything about creating proper, compatible file from 3D numpy array by VMTK (that's why I needed VTK).

Sorry for a long and complex text, but I hope you understand my problem. P.S. I have added PYTHONPATH env. variable, but it didn't solve the problem.

Kind regards, 
Zibi

Simone Manini

unread,
Aug 30, 2016, 3:15:17 PM8/30/16
to vmtk-...@googlegroups.com
Dear Zibi,
one quick solution could be to compile vmtk from source and during CMake specify to use the system VTK that you have previously installed.
It should work.
Instructions for building vmtk from source are here: http://www.vmtk.org/download/#development-version
Best Regards
Simone

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
Simone Manini, Eng
Engineer, OROBIX Srl
via Camozzi 144, 24121 Bergamo, Italy

orobix:  www.orobix.com
web:     daron1337.github.io
twitter:  @daron1337
phone:  +39 035 0273786
             +39 035 0170561

"This message originates from Orobix Srl and its contents and attachments are privileged and confidential and are intended only for the individual(s) or entity(ies) named above. This message should not be forwarded, distributed or disclosed. Any unauthorized use, dissemination and duplication is strictly prohibited and may be unlawful. All personal messages express views solely of the sender, which are not to be attributed to Orobix Srl, and may not be copied or distributed without this disclaimer. If you are not the intended recipient or received this message in error, please delete this message and notify the sender by reply e-mail. Opinions, conclusions and other information in this message that do not relate to the official business of Orobix Srl shall be understood as neither given nor endorsed by it."

zbysze...@gmail.com

unread,
Oct 4, 2016, 2:15:14 PM10/4/16
to vmtk-users
Dear Simone,

Thank you for a response and a tip. Assuming I would compile vmtk from source and my program would work as intended, is there a possibility of creating the executable file from it via py2exe? Currently I managed to create such an .exe file (however, I encountered difficulties connected with some of the modules and packages I used), but I do not know how vmtk will behave in that matter. Have you ever tried creating exe file from python script incorporating vmtk module?

Kind regards,
Zibi

Simone Manini

unread,
Oct 5, 2016, 9:50:13 AM10/5/16
to vmtk-users
Dear Zibi,
no I never tried.
Teoretically, it should work. Please be sure to include all bin and lib dependencies.
Best Regards
Simone

--
You received this message because you are subscribed to the Google Groups "vmtk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vmtk-users+...@googlegroups.com.
To post to this group, send email to vmtk-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages