Alternative to ImageJ 3D Viewer (Benjamin Schmid's)

fiji
imagej

#12

Huh? I am not aware of any other solution than having JFX on your local machine, as long as you want to use Java8. OpenJFX11 is available through maven but requires Java10 for byte code compatibility.

That looks like a problem with lwjgl/scenery, and not JavaFX. @skalarproduktraum @kephale please help


#13

@albertcardona

What is in the jars/ directory?

I think I’ve seen this one when LWJGL jars get unpacked to the wrong directory.

FWIW, I use the Oracle JVM on my Ubuntu machine and have no issues.


#14

Hi @kephale, I am not sure I follow. I installed sciview from the update site via Fiji’s update system. Surely the jars are in the right place? Or you mean the JavaFX files?

On JavaFX, would version 8 then work, as installed by apt-get? What is the minimum JavaFX version for SciView to work? And are these apt-get installed files that are the ones perhaps in an unusual place? I am using Ubuntu 16.04.


#15

As @hanslovsky pointed out, it looks like the problem is coming from LWJGL (which packages the native libs used by scenery/SciView). It is not clear to me what is missing, but something is missing. I have seen similar errors pop up when the LWJGL native libraries get unpacked to the wrong place. It isn’t clear to me why that would be happening to you, as my Ubuntu box doesn’t have any issues with the SciView from the update site, but I haven’t had a chance to test it with OpenJDK on that machine.

Hopefully it is just a sanity check, but:
1 - it would be good to know what is inside jars/linux64 which is where the native libs should be unpacked for you, or just the whole listing of jars and its subdirectories if you don’t mind.
2 - it would also be good to know what jars are on your classpath


#16

Hey @albertcardona,

I think the source of the issue you are seeing is a quite outdated JDK - 8u60 if I read this correctly. Could you please try with 8u121 or higher and see if this changes things? Thanks!

Sorry, missed you are running 8u181 and confused it with the OpenJFX version. Could you please run Fiji with the flags the error message suggested, -Dorg.lwjgl.util.Debug=true and -Dorg.lwjgl.util.DebugLoader=true, and gist the complete log?

Thanks, and sorry for the confusion!


#17

Hi @skalarproduktraum,

I’ve installed JavaFX with apt-get install openjfx, which installs 8u60.
The java version is 1.8.0_181.

I’ve run fiji like:

$ ./ImageJ-linux64  -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true --

And the “Console” log says:

Started application as PID 16757
[LWJGL] Version: 3.2.0 build 12
[LWJGL] 	 OS: Linux v4.4.0-138-generic
[LWJGL] 	JRE: 1.8.0_181 amd64
[LWJGL] 	JVM: OpenJDK 64-Bit Server VM v25.181-b13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Extracting: file:/home/albert/Programming/fiji-new/Fiji.app/jars/linux64/lwjgl-3.2.0-natives-linux.jar!/liblwjgl.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglalbert/3.2.0-build-12/liblwjgl.so
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] Loading library: jemalloc
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Extracting: file:/home/albert/Programming/fiji-new/Fiji.app/jars/linux64/lwjgl-jemalloc-3.2.0-natives-linux.jar!/libjemalloc.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglalbert/3.2.0-build-12/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
[LWJGL] Loading library: libvulkan.so.1
[LWJGL] 	libvulkan.so.1 not found in org.lwjgl.librarypath=/tmp/lwjglalbert/3.2.0-build-12
[LWJGL] 	libvulkan.so.1 not found in system paths
[LWJGL] 	libvulkan.so.1 not found in java.library.path=/home/albert/Programming/fiji-new/Fiji.app/lib/linux64:/home/albert/Programming/fiji-new/Fiji.app/mm/linux64:/tmp/spirvcrossj-natives-tmp6395579122179964866:/home/albert/Programming/fiji-new/Fiji.app/src/natives
[LWJGL] Failed to load a library. Possible solutions:
	a) Install the library or the driver that provides the library.
	b) Ensure that the library is accessible from the system library paths.

And the terminal says:

$ ./ImageJ-linux64  -Dorg.lwjgl.util.Debug=true -Dorg.lwjgl.util.DebugLoader=true --

OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
[GC (Allocation Failure)  272640K->19943K(8354560K), 0.0780626 secs]
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/albert/Programming/fiji-new/Fiji.app/jars/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/albert/Programming/fiji-new/Fiji.app/jars/slf4j-simple-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[GC (Allocation Failure)  292583K->46620K(8354560K), 0.1306058 secs]
[GC (CMS Initial Mark)  56786K(8354560K), 0.0123498 secs]
[GC (Allocation Failure)  319260K->58026K(8354560K), 0.0996526 secs]
[GC (CMS Final Remark)  188995K(8354560K), 0.0532170 secs]
Started application as PID 16757
[GC (Allocation Failure)  318951K->79207K(8354560K), 0.0832293 secs]
[LWJGL] Version: 3.2.0 build 12
[LWJGL] 	 OS: Linux v4.4.0-138-generic
[LWJGL] 	JRE: 1.8.0_181 amd64
[LWJGL] 	JVM: OpenJDK 64-Bit Server VM v25.181-b13 by Oracle Corporation
[LWJGL] Loading library (system): lwjgl
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Extracting: file:/home/albert/Programming/fiji-new/Fiji.app/jars/linux64/lwjgl-3.2.0-natives-linux.jar!/liblwjgl.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglalbert/3.2.0-build-12/liblwjgl.so
[LWJGL] MemoryUtil accessor: MemoryAccessorUnsafe
[LWJGL] Loading library: jemalloc
[LWJGL] 	Using SharedLibraryLoader...
[LWJGL] 	Extracting: file:/home/albert/Programming/fiji-new/Fiji.app/jars/linux64/lwjgl-jemalloc-3.2.0-natives-linux.jar!/libjemalloc.so
[LWJGL] 	Loaded from org.lwjgl.librarypath: /tmp/lwjglalbert/3.2.0-build-12/libjemalloc.so
[LWJGL] MemoryUtil allocator: JEmallocAllocator
Loaded Deferred Shading (Deferred Shading, with HDR postprocessing and FXAA)
[LWJGL] Loading library: libvulkan.so.1
[LWJGL] 	libvulkan.so.1 not found in org.lwjgl.librarypath=/tmp/lwjglalbert/3.2.0-build-12
[LWJGL] 	libvulkan.so.1 not found in system paths
[LWJGL] 	libvulkan.so.1 not found in java.library.path=/home/albert/Programming/fiji-new/Fiji.app/lib/linux64:/home/albert/Programming/fiji-new/Fiji.app/mm/linux64:/tmp/spirvcrossj-natives-tmp6395579122179964866:/home/albert/Programming/fiji-new/Fiji.app/src/natives
[LWJGL] Failed to load a library. Possible solutions:
	a) Install the library or the driver that provides the library.
	b) Ensure that the library is accessible from the system library paths.
[GC (CMS Initial Mark)  262875K(8354560K), 0.0168678 secs]
[Full GC (System.gc())  311974K->43677K(8354560K), 0.1722228 secs]

Is there any other log?

Thanks.


#18

That is already very helpful! It’s not finding the Vulkan runtime! That should actually be caught, I’ll talk to the LWJGL people why this is not thrown as exception…

First, it’s important your graphics driver is up-to-date, could you please verify that?
Second, depending on your GPU, you have two options:

  1. if it’s an older one, try forcing it to run with OpenGL instead of Vulkan by defining -Dscenery.Renderer=OpenGLRenderer (this should actually be done automatically as fallback)
  2. install the Vulkan runtime (should be libvulkan in Ubuntu if I recall correctly)

Please let me know if this helped, thanks :+1:


#19

Hi @kephale,

The whole listing of jars/linux64:

$ /bin/ls
ffmpeg-2.6.1-0.11-linux-x86_64.jar
gluegen-rt-2.3.2-natives-linux-amd64.jar
jinput-platform-2.0.7-natives-linux.jar
joal-2.3.2-natives-linux-amd64.jar
jocl-2.3.2-natives-linux-amd64.jar
jogl-all-2.3.2-natives-linux-amd64.jar
jvrpn-1.1.0-natives-linux.jar
lwjgl-3.2.0-natives-linux.jar
lwjgl-glfw-3.2.0-natives-linux.jar
lwjgl-jemalloc-3.2.0-natives-linux.jar
lwjgl-opengl-3.2.0-natives-linux.jar
lwjgl-openvr-3.2.0-natives-linux.jar
spirvcrossj-0.4.2-natives-linux.jar

Jars in the classpath: that list might be very long. The ImageJ java class path (System.getProperty(“java.class.path”)) itself is very short, given the new way in which Fiji loads jar files:

/home/albert/Programming/fiji-new/Fiji.app/jars/imagej-launcher-4.0.5.jar

Albert


#20

Thanks!

So I installed vulkan:

$ sudo apt-get install libvulkan1

… and now there is only one error:

...
[ERROR] Call to Creating Vulkan instance failed: The requested version of Vulkan is not supported by the driver or is otherwise incompatible for implementation-specific reasons.
...

The driver is up to date, as far as I know, but likely this is the issue in my laptop. Will try the opengl backend, and also in a different computer.

Thanks very much.


#21

Okay great, progress :sunglasses:

Could you still let me know what GPU your laptop has so I can add it to the compatibility matrix at https://github.com/scenerygraphics/scenery#gpu-compatibility

Thanks!


#22

Heh, as soon as we disabled automatically defaulting to the OpenGL backend… :smiley:


#23

According to lspci, my laptop has this graphics card:

VGA compatible controller: Intel Corporation Sky Lake Integrated Graphics (rev 07)

The “Additional Drivers” dialog does not list any drivers in use. So the default is used (mesa? or intel specific?), I don’t know.


#24

glxinfo might shed some addition additional light - look for “OpenGL renderer string” and “OpenGL core profile version string”


#25

Mesa:

OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5

#26

The driver xserver-xorg-video-intel is installed, but somehow Ubuntu 16.04 isn’t using it. The “additional drivers” doesn’t list any (would list any proprietary drivers).


#27

Okay, the Skylake chips definitely support Vulkan on Linux, https://askubuntu.com/questions/807857/how-to-install-intel-graphics-driver-for-using-vulkan-on-ubuntu-16-04 might be of help for the setup in case you want it. OpenGL is fine as well.

In the meantime, I have also spoken to the LWJGL people and have a solution how to fall back to OpenGL in case even the Vulkan Runtime is not found. Thanks for pointing this issue out, @albertcardona :+1:

And regarding JavaFX, I think we will check upon startup whether it can be initialized and warn the user if it’s not the case, together with instructions what to do.


#28

Also just found this: https://packages.ubuntu.com/xenial-updates/mesa-vulkan-drivers – install this and vulkan-utils and you should be golden (indicated by a very long output of vulkaninfo).

The Intel drivers supporting Vulkan on Linux are open-source (as are AMD’s), no need for proprietary stuff :+1:


Unable to convert stl to stacks
#29

Thanks, that enabled SciView window to show up with only some warnings listed in the Console.

So in summary, to get SciView working in ubuntu 16.04, having java 1.8.0_181 and an intel graphics card:

sudo apt-get install openjfx libvulkan1 mesa-vulkan-drivers vulkan-utils

Now, I accidentally double-clicked the SciView window bar, and in attempting to maximize, it segfaulted.

Also, I tried to add a volume that was in a .zip file. It tried to open it (CPU at 100%) for a long time. If it is using scifio, it won’t finish in ages (known bug in scifio).
Closing the SciView window did not stop the loading of the file (the CPU at 100%).
Attempting to open SciView again while in this state didn’t work: nothing shows up.
So I control-c the whole fiji and start again.

I have to click the menus twice for the menus to show.

Then I tried to “Edit - Add Volume”. A dialog shows up asking for calibration, but the last requested value I am not sure if it is for resampling. Says “Global rendering scale”.

So far, I haven’t been able to see any volume, unfortunately.

Warnings in the console when opening SciView:

[WARN] ForwardShading: Shader does not use input of GeometryBuffer.ZBuffer
[WARN] ForwardShading: Shader does not use input of ForwardBuffer.Color

Warnings when attempting to load a volume from “Edit - Add Volume”:

[WARN] DeferredLighting: Shader does not use input of GeometryBuffer
[WARN] DeferredLighting: Shader does not use input of AOBuffer
[WARN] ForwardShading: Shader does not use input of ForwardBuffer.Color

#30

The warnings you can safely ignore.

The Open command directly in SciView should actually be removed, as we want people to open their datasets via Fiji and then load them into SciView. Loading your ZIP via Fiji and then using Add Volume should work though. The global rendering scale is just for scaling the added volume isotropically, in addition to the normal voxel sizes, as we currently assume 1 world unit = 1 voxel, which is actually too large and will change in the next version. The double click issue on the menus I cannot reproduce. Have you seen this before, @kephale?

As a general sanity check you can try the 3D game of life demo (Demo > Game of Life 3D), to see whether there’s a general issue with volume rendering. Sorry for your experience so far, we didn’t have a chance yet to test it extensively on the integrated Intel GPUs. And again, big thanks for reporting this!

PS: If you don’t mind sharing your dataset, I’d like to have a look at it, whether it’d work for me. Thanks :slight_smile:
PPS: If you have a log file from the segfault, could you also please share that?


#31

The segfault (had to zip, couldn’t upload a .log file):
hs_err_pid20191.log.zip (32.2 KB)

The data set (load the first file): https://www.dropbox.com/sh/gd1lnpzkxdjsh1a/AABmTNtQ1NoKuha_Rw9HOzzsa?dl=0

Looking forward to trying out SciView in another computer soon.