Jonathan-David Schröder
Jonathan-David Schröder
Rearranged TODO list into 3 distinct numpy, PIL, scikit sections at the top of this issue
- discarded to_numpy_gmic and from_numpy_gmic converters (ie. for non (de)-interleaved non-permuted numpyg'mic array conversion), in favour of just to_/from_numpy_helper's default parameters as they are now (and locked in their behaviour...
Come on come on!!! A few TODO checkboxes remaining and we are close to the goal!!!
Possibly: 1. detect non-interactivity / IPython environment 2. use unconfined IPython display as in [this StackOverflow answer](https://stackoverflow.com/questions/32370281/how-to-embed-image-or-picture-in-jupyter-notebook-either-from-a-local-machine-o) using either a temporary file address or a base-64-encoded image. `2.` tested successfully...
Jupyter detection techniques: https://gist.github.com/DIYer22/5cc015dcef53d62c16bdff0f8f345e96 In short, detecting a gui (be it web or Qt) boils down to: `'ipykernel' in sys.modules == True`. Tested in jupyter qtconsole (`True`), jupyter online (`True`),...
We could, depending on availability on the client's Jupyter notepad: 1. use the matplotlib interactive viewer if available... without using the to_numpy_array() converter for now, but just an image output...
`"DISPLAY"` key existence-testing in `sys.environ` helps to know if `gmic.run("display")` will fail display anything for sure (tested) https://stackoverflow.com/a/8258144/420684
The pure-Python implementation could be like: ```python def gmic_run(command, images): # image processing .. changing 'images' in place if "DISPLAY" not in sys.environ: for pos, image in enumerate(images): #get image...
the "display" command within a jupyter / ipython / X-less environment will (now just with a `nodisplay=True` flag in `gmic.run`.. because my computer has display) dump images to local temporary...
Coming soon: matplotlib support - inline or with the qt5 widget.. 