rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.
https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage
Other
204 stars 32 forks source link

How to add packages to python for scripting #48

Closed qian-chu closed 11 months ago

qian-chu commented 1 year ago

Hi, I'm a big fan of the scripting with python function and have been using it to auto-generate images. However, I noticed that python 3.7 embedded in the Linux release of MRIcroGL has a quite limited number of packages. json, for one, is not available but is extremely useful to read json files, which contain parameters I'd like MRIcroGL to use when running built-in functions.

What would be the correct way to add packages to the embedded python library? Or would it be possible to keep the libraries consistent across MRIcroGL on different OS (e.g., the windows version has json but Linux doesn't )?

neurolabusc commented 1 year ago

This is out of my expertise. MRIcroGL used to use the copy of Python used by the operating system. However, this got blocked by some operating systems that see this as a security concern.

It may be worth having your favorite copy of Python with all of its libraries do all of your processing and launch MRIcroGL with the desired outputs.

You may want to follow the development of the nascent ipyniivue which will provide nice visualization into a Jupyter notebook.