Open ctrueden opened 5 years ago
The screenshot below shows a SciView volume rendering of the MNI152 image included with MRIcroGL. As I noted, I do not seem to be able to alter the transfer function (e.g. all the air outside the brain has the minimum intensity [0] but appears translucent rather than transparent).
Also note that I have set the Edit>Options>Appearance for my HiDPI mode (“Menu font size” 16 and “GUI scale” 2) to improve readability but these settings do not influence SciView (note tiny font size for SciView relative to ImageJ).
I cannot speak to the transfer function issue (maybe @kephale or @skalarproduktraum can), but regarding the font size: this might be because SciView's UI is built on Swing rather than AWT.
@neurolabusc Are you using Java 9+? Or Java 8?
I downloaded the latest stable Fiji and then updated it from the Fiji GUI. Can I specify different versions of Java at launch, or are there development builds for different versions of Java?
The Plugins>Utilities>ImageJ Properties command reports the following
java.version: 1.8.0_172
java.vendor: Oracle Corporation
os.name: Linux
os.version: 4.15.0-38-generic
os.arch: amd64
...
IJ.getVersion: 2.0.0-rc-71/1.52r
IJ.getFullVersion: 1.52r06
IJ.javaVersion: 8
IJ.isLinux: true
IJ.isMacintosh: false
IJ.isMacOSX: false
IJ.isWindows: false
IJ.is64Bit: true
....
Can I specify different versions of Java at launch
Yes, see instructions here. Essentially it boils down to using the --java-home
command line parameter.
I tried this, but whatever I launch ImageJ wants to look for files in a folder '/amd64'
I can find the file
/usr/lib/jvm/java-11-openjdk-amd64/lib/server/libjvm.so
but not
/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/server/libjvm.so
When I run
$HOME/Fiji.app/ImageJ-linux64 --java-home /usr/lib/jvm/java-11-openjdk-amd64
I get
Could not load Java library '/usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/server/libjvm.so': /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64/server/libjvm.so: cannot open shared object file: No such file or directory
Doing a web search I also tried
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
$HOME/Fiji.app/ImageJ-linux64
but this seems to have no effect, as I still get ImageJ running on Java 8.
It looks like this issue was first noted in June '18 but remains unresolved.
Inspired by this issue I created a symlink to the library:
sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64
I was able to launch ImageJ with this command
$HOME/Fiji.app/ImageJ-linux64 --default-gc --java-home /usr/lib/jvm/java-11-openjdk-amd64
The base ImageJ seems to load fine (though a lot of errors were reported in the Console log, most seem to be related to SciJava) and the Bio-Formats module was able to load a NIfTI volume without problems. However choosing Plugins->SciView caused ImageJ to crash right after the splash screen.
[ERROR]: Cannot locate JRE jar in /usr/lib/jvm/java-11-openjdk-amd64
[ERROR] Cannot create plugin: class='org.scijava.ui.swing.script.languagesupport.JavaLanguageSupportPlugin', priority=0.0, enabled=true, pluginType=LanguageSupportPlugin
java.lang.IllegalArgumentException: info cannot be null
at org.fife.rsta.ac.java.JarManager.addClassFileSource(JarManager.java:157)
at org.fife.rsta.ac.java.JarManager.addCurrentJreClassFileSource(JarManager.java:193)
at org.scijava.ui.swing.script.languagesupport.JavaLanguageSupportPlugin.<init>(JavaLanguageSupportPlugin.java:56)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.lang.Class.newInstance(Class.java:584)
at org.scijava.plugin.PluginInfo.createInstance(PluginInfo.java:306)
at org.scijava.plugin.DefaultPluginService.createInstance(DefaultPluginService.java:237)
at org.scijava.plugin.DefaultPluginService.createInstances(DefaultPluginService.java:226)
at org.scijava.plugin.DefaultPluginService.createInstancesOfType(DefaultPluginService.java:217)
at org.scijava.plugin.AbstractSingletonService.initInstances(AbstractSingletonService.java:138)
at org.scijava.plugin.AbstractSingletonService.getInstances(AbstractSingletonService.java:77)
at org.scijava.plugin.SingletonService.lambda$initialize$0(SingletonService.java:97)
at org.scijava.object.ObjectIndex.resolvePending(ObjectIndex.java:388)
at org.scijava.object.ObjectIndex.get(ObjectIndex.java:133)
at org.scijava.object.DefaultObjectService.getObjects(DefaultObjectService.java:87)
at org.scijava.display.DefaultDisplayService.getDisplays(DefaultDisplayService.java:166)
at org.scijava.ui.DefaultUIService.showUI(DefaultUIService.java:159)
at org.scijava.ui.DefaultUIService.showUI(DefaultUIService.java:142)
at org.scijava.AbstractGateway.launch(AbstractGateway.java:104)
at net.imagej.Main.main(Main.java:55)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at net.imagej.launcher.ClassLauncher.launch(ClassLauncher.java:279)
at net.imagej.launcher.ClassLauncher.run(ClassLauncher.java:186)
at net.imagej.launcher.ClassLauncher.main(ClassLauncher.java:77)
[INFO] Reading available sites from https://imagej.net/
@neurolabusc Thanks for the detailed feedback.
``` java.lang.IllegalArgumentException: info cannot be null at org.fife.rsta.ac.java.JarManager.addClassFileSource(JarManager.java:157) at org.fife.rsta.ac.java.JarManager.addCurrentJreClassFileSource(JarManager.java:193) at org.scijava.ui.swing.script.languagesupport.JavaLanguageSupportPlugin.(JavaLanguageSupportPlugin.java:56) ```
Fixed with scijava/script-editor@3899427ac930c534911284f7d3cf46d79371fed0.
Inspired by this [issue](https://github.com/imagej/imagej/issues/155) I created a symlink to the library: ``` sudo ln -s /usr/lib/jvm/java-11-openjdk-amd64/lib /usr/lib/jvm/java-11-openjdk-amd64/lib/amd64 ```
@stelfrich and I believe we fixed this with imagej/imagej-launcher@1049eac6ec9931b1e98bcecc078865a5bca78afd.
It will probably be a few days before these changes propagate to the ImageJ Updater.
From @neurolabusc via private mail:
Followed by: