scenerygraphics / sciview

sciview is a tool for visualization and interaction with ND image and mesh data
BSD 2-Clause "Simplified" License
67 stars 17 forks source link

NullPointerException #256

Closed atarkowska closed 4 years ago

atarkowska commented 4 years ago

I have been trying to test drosophila BDV image from https://github.com/scenerygraphics/sciview/blob/master/src/main/java/sc/iview/commands/demo/EmbryoDemo.java#L111

Dispite the fact that https://fly.mpi-cbg.de/~pietzsch/bdv-examples/ image is not avaialble I downloaded drosophila from https://downloads.openmicroscopy.org/images/BDV/samples and stored in localDir that is used as a cache but I am still getting an error.

Is that something could be fixed?

Visible: at t=0: 0, 1
(0, 0) -> ooc:2 reg:0
[ERROR] Module threw exception
java.lang.NullPointerException
    at java.io.Reader.<init>(Reader.java:78)
    at java.io.InputStreamReader.<init>(InputStreamReader.java:72)
    at tpietzsch.shadergen.generate.StringTemplateUtils.loadAndPatchSnippet(StringTemplateUtils.java:46)
    at tpietzsch.shadergen.generate.SegmentTemplate.<init>(SegmentTemplate.java:52)
    at tpietzsch.shadergen.generate.SegmentTemplate.<init>(SegmentTemplate.java:42)
    at tpietzsch.example2.MultiVolumeShaderMip.<init>(MultiVolumeShaderMip.java:74)
    at graphics.scenery.volumes.bdv.BDVVolume.needAtLeastNumVolumes(BDVVolume.kt:268)
    at graphics.scenery.volumes.bdv.BDVVolume.<init>(BDVVolume.kt:192)
    at sc.iview.SciView.addBDVVolume(SciView.java:1555)
    at sc.iview.commands.demo.EmbryoDemo.run(EmbryoDemo.java:117)
    at org.scijava.command.CommandModule.run(CommandModule.java:199)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
kephale commented 4 years ago

Hi Ola,

How are you running the EmbryoDemo? Via your IDE or from one of the SciView update sites (and if so, which one, SciView or SciView-Unstable)?

Thanks for the report! Kyle

skalarproduktraum commented 4 years ago

Hi Ola! There was actually an issue in loading the shaders for BDVVolume, I have just fixed this and we're gonna push an update to the SciView-Unstable update site shortly. I'll let you know when it's up 👍

That being said, the BDV support is currently undergoing a major revamp, and we're actually switching all the volume rendering in scenery/sciview over to a modified version of BVV (see scenerygraphics/scenery#292), so there'll be a larger update in the next weeks. The current state of the BDV support might be slightly shaky.

atarkowska commented 4 years ago

Hi Ola,

How are you running the EmbryoDemo? Via your IDE or from one of the SciView update sites (and if so, which one, SciView or SciView-Unstable)?

Thanks for the report! Kyle

I am running it from fiji so I presume stable and released version, and testing oculus

atarkowska commented 4 years ago

Hi Ola! There was actually an issue in loading the shaders for BDVVolume, I have just fixed this and we're gonna push an update to the SciView-Unstable update site shortly. I'll let you know when it's up 👍

That being said, the BDV support is currently undergoing a major revamp, and we're actually switching all the volume rendering in scenery/sciview over to a modified version of BVV (see scenerygraphics/scenery#292), so there'll be a larger update in the next weeks. The current state of the BDV support might be slightly shaky.

@skalarproduktraum thanks for the quick answer. Great to hear there is a major development on this project. I am following that with the great intreset. Do you have a CI/CD building sciview nightly where I could grab just unstable or just that plugin and test please?

Is BVV supported by BioFormats? Alternatively how conversion could look like?

kephale commented 4 years ago

The SciView-Unstable site is https://sites.imagej.net/SciView-Unstable/ it is linked to the current version on master

SciView supports BioFormats + BVV. BioFormats doesn't have to do anything special to handle BVV (except possibly supporting BDV's xml hdf5 format and/or the n5 format, for multiresolution images). However, if you are using BVV in SciView + ImageJ you will get those features for free in this release that @skalarproduktraum mentioned.

atarkowska commented 4 years ago

Thanks for the quick answer, yeah multiresolution is a different story. I will give a try and let you guys know.

skalarproduktraum commented 4 years ago

@olatarkowska sciview handles pyramids the same way BDV does, with the difference that the highest-res blocks will only be loaded if it actually makes sense (aka, if pixel size on-screen equals pixel size in the block). And because volume rendering is more expensive than the slice-based rendering BDV does, we're exploring some options to automatically reduce the maximum resolution (e.g., if the framerate gets too low).

skalarproduktraum commented 4 years ago

@olatarkowska Hi again! We unfortunately had some issues with the automated build system, so the update site didn't actually update. This is to notify you that it now actually is updated, sorry for the delay. Please also be sure to use the SciView-Unstable update site instead of the regular one (simply replace SciView by SciView-Unstable in the update site URL)

atarkowska commented 4 years ago

@skalarproduktraum thank you for letting me know and apology for a slow follow up. I started brand new fiji installation and I used SciView-Unstable but URL https://fly.mpi-cbg.de/~pietzsch/bdv-examples/ in https://github.com/scenerygraphics/sciview/blob/master/src/main/java/sc/iview/commands/demo/EmbryoDemo.java#L111 gives me 404. I saved https://downloads.openmicroscopy.org/images/BDV/samples/drosophila.h5 in the Desktop folder but not sure if that is the same image. Please see the movie

SciView - 2020-03-02 09.40.48.mp4.zip

Could you please help me with that example?

skalarproduktraum commented 4 years ago

Hey Ola, unfortunately I don't have time today, but I will check out the example tomorrow, and update it with a current dataset. Sorry this isn't working at the moment!

atarkowska commented 4 years ago

@skalarproduktraum thanks a lot, I would love to be able to see BDV image in VR headset :-)