Last active
October 26, 2020 13:15
-
-
Save oeway/a1bea43002feb2defc4f3bad7c0a7507 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from imjoy import api | |
import imageio | |
class ImJoyPlugin(): | |
async def setup(self): | |
api.log('initialized') | |
async def run(self, ctx): | |
# run `pip install imjoy-elfinder` and start it by running `imjoy-elfinder` before the following command | |
fileDialog = await api.showDialog(type="ImJoy elFinder") | |
files = await fileDialog.getSelections() | |
image = imageio.imread(files[0].path) | |
api.showDialog(type="itk-vtk-viewer", src="https://oeway.github.io/itk-vtk-viewer/", data={"image_array": image}) | |
api.export(ImJoyPlugin()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment