Created
May 30, 2022 23:18
-
-
Save nikitinvv/b71b0be4487142da1afd471b94265fee 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
# open numpy array in imagej | |
###################################################################################### | |
# Installation: | |
# 1. conda create -n pyimagej -c conda-forge pyimagej openjdk=8 | |
# 2. conda activate pyimagej | |
####################################################################################### | |
import imagej | |
import numpy as np | |
ij = imagej.init('/home/beams/TOMO/Software/Fiji.app',mode='interactive') | |
ij.ui().showUI() | |
from jpype import JClass | |
WindowManager = JClass('ij.WindowManager') | |
a = np.random.random([5,128,128]).astype('float32') | |
ij.ui().show('recon', ij.py.to_dataset(a)) | |
while True: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment