These are chat archives for fiji/fiji

10th
Feb 2016
Ulrik Günther
@skalarproduktraum
Feb 10 2016 10:27
@ctrueden: okay, we’ve merged the changes into the clearvolume plugin and put it on the update site. clearvolume now works with the java-8 update site without problems :) but is there any way to require users to also have the java 8 update site activated when they activate the cv update site?
Curtis Rueden
@ctrueden
Feb 10 2016 14:23
No, unfortunately. Actually, you can add a hack to turn it on from Java code (OpenSPIM turns Micro-Manager-dev this way) but I wouldn't suggest it. In ImageJ3 (haha) we need a more granular update mechanism that works "per extension" with dependency management.
The good news is that Java-8 is on by default in the current Fiji bundles now.
If you want you can also add a runtime check for whatever class and catch ClassNotFoundException etc. and print a message like "required libs not found; is the Java-8 update site enabled?"
We could standardize such check as a core utility function too if that would help you, since I think it would be generally useful.
Ulrik Günther
@skalarproduktraum
Feb 10 2016 15:12
Yeah we already discuss about something like your last suggestion, I think we’ll go for that
Florian Jug
@fjug
Feb 10 2016 15:21
@ctrueden fantastic idea!
@ctrueden we tested on macs and linux machines (I think all of them running ubuntu 14). Please let us know if you experience problems with ClearVolume… thanks! :)
Richard Domander
@rimadoma
Feb 10 2016 15:34
@ctrueden Such a utility method would be handy. I think it should be generic enough, something like:
public void checkJava8Lib() throws ClassNotFoundException {
     checkLib(JavaClass.class, "Java 8 not found - is the update site enabled?", true);
}

public void checkLib(Class libClass, String errMessage, boolean showDialog) throws ClassNotFoundException {
    ...
}
Curtis Rueden
@ctrueden
Feb 10 2016 15:48
@rimadoma Something like that, yeah. You have to be really careful about class loading though. Ideally we want to only show the friendly error, and never a ClassNotFoundException or NoClassDefFoundError stack trace. Having a direct reference to the .class object itself could cause the checkJava8Lib() method itself to throw said error.
Ulrik Günther
@skalarproduktraum
Feb 10 2016 15:55
how about Class.forName() and catching ClassNotFound?
Curtis Rueden
@ctrueden
Feb 10 2016 16:15
@skalarproduktraum You have to be really careful about Class.forName() because if you use the wrong ClassLoader then you may get very surprising results. sigh
Let's just generalize this to say "you have to be really careful all the time when you are programming" :stuck_out_tongue_closed_eyes:
Ulrik Günther
@skalarproduktraum
Feb 10 2016 16:16
I’d really like a language with one function… doWhatIThinkIMean()
Curtis Rueden
@ctrueden
Feb 10 2016 16:16
It's like Microsoft Word's "Stop Sucking" toolbar button! You press it, and the program stops sucking.
Richard Domander
@rimadoma
Feb 10 2016 16:16
or doWhatIMeanNotWhatISay()
Curtis Rueden
@ctrueden
Feb 10 2016 16:17
In this case, I think reflection (i.e., Class.forName) is likely the way to go for this utility method... as long as we do a bit of testing of course.
I actually wrote this many years ago for Bio-Formats.
Richard Domander
@rimadoma
Feb 10 2016 16:18
@skalarproduktraum Your language could have one additional method: doMyTaxesWhileYouAreAtIt()
Ulrik Günther
@skalarproduktraum
Feb 10 2016 16:18
right, that’d be nice, and maybe also cleanMyApartment()
writeMyThesis() etc
Ulrik Günther
@skalarproduktraum
Feb 10 2016 16:26
@ctrueden: when I have a stack, and run xy resize on it, without creating a new window, is it expected behaviour that the dimensions stay the same and the image is put in the middle of the canvas?
(if i run the same with creating a new window, the canvas is resized as well)
Curtis Rueden
@ctrueden
Feb 10 2016 17:08
@skalarproduktraum What is "xy resize"?
Image > Adjust > Size... ? Or Image > Crop ?
It is expected behavior that the size of the window changes to match the new image size, actually. That's what happens on my system. Using ImageJ 1.x legacy UI, I assume you mean.
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:50
@ctrueden: no, that’s not actually what i meant… i was talking about Image > Scale
Screen Shot 2016-02-10 at 18.49.39.png
thats before
Screen Shot 2016-02-10 at 18.49.51.png
that is after
and not actually what i’d expect. and also not what happens when you use Create new window
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:56
Hi everybody, I do not get ClearVOlume to run
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:57
hey stephan, what’s the problem?
we just updated the plugin today, it requires you to have the java8 update site enabled now
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:57
my platform is Ubuntu 15.04
I just updated
that's why i am here, I tried it before, failed, was at night, didn't follow up
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:58
what’s the error?
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:58
now seemed a good time to try again seeing all this conversation about it ;)
com.apple.eawt.Application
Feb 10, 2016 12:55:30 PM org.bridj.BridJ log
INFO: Library not found : atiocl64
Feb 10, 2016 12:55:31 PM org.bridj.BridJ log
INFO: Library not found : amdocl64
Feb 10, 2016 12:55:31 PM org.bridj.BridJ log
INFO: Library not found : atiocl32
Feb 10, 2016 12:55:31 PM org.bridj.BridJ log
INFO: Library not found : atiocl
Feb 10, 2016 12:55:31 PM org.bridj.BridJ log
INFO: Library not found : amdocl32
Feb 10, 2016 12:55:31 PM org.bridj.BridJ log
INFO: Library not found : amdocl
java.lang.ExceptionInInitializerError
at clearvolume.renderer.opencl.OpenCLAvailability.isOpenCLAvailable(OpenCLAvailability.java:9)
at clearvolume.renderer.factory.ClearVolumeRendererFactory.newOpenCLRenderer(ClearVolumeRendererFactory.java:314)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initClearVolumeUnsignedShortArrayImg(ImgLib2ClearVolume.java:262)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:445)
at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:182)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:303)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:160)
at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:86)
at org.scijava.command.CommandModule.run(CommandModule.java:201)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.nativelibs4java.opencl.CLException: OpenCL Error : (make sure to log all errors with environment variable CL_LOG_ERRORS=stdout)
at com.nativelibs4java.opencl.CLException.error(CLException.java:310)
at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.getPlatformIDs(JavaCL.java:155)
at com.nativelibs4java.opencl.JavaCL$OpenCLProbeLibrary.hasOpenCL1_0(JavaCL.java:166)
at com.nativelibs4java.opencl.JavaCL.<clinit>(JavaCL.java:225)
... 17 more
[ERROR] Module threw exception
java.lang.NullPointerException
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initClearVolumeUnsignedShortArrayImg(ImgLib2ClearVolume.java:273)
at de.mpicbg.jug.clearvolume.ImgLib2ClearVolume.initRealImgs(ImgLib2ClearVolume.java:445)
at de.mpicbg.jug.clearvolume.gui.ClearVolumeManager.run(ClearVolumeManager.java:182)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.launchClearVolumeManager(GenericClearVolumeGui.java:303)
at de.mpicbg.jug.clearvolume.gui.GenericClearVolumeGui.<init>(GenericClearVolumeGui.java:160)
at de.mpicbg.jug.plugins.ClearVolumePlugin.run(ClearVolumePlugin.java:86)
at org.scijava.command.CommandModule.run(CommandModule.java:201)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
at org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:58
@fjug had exactly the same issue today :D
problem is that your opencl libraries are not setup correctly
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:59
so what is it?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:59
can you run clinfo?
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:59
sure
Ulrik Günther
@skalarproduktraum
Feb 10 2016 17:59
(might have to install it)
Stephan Saalfeld
@axtimwalde
Feb 10 2016 17:59
clinfo
main:2238: number of platforms : error -1001
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:00
so florian solved it by reinstalling the graphics drivers
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:00
i did that last time, any specific instructions?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:00
clinfo should actually tell you the details about the opencl-capable devices on your machine
no, not really… but his ubuntu self-updated 2 days ago and removed quite a lot of nvidia stuff, we conjectured that might be the culprit
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:01
so what do i need?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:01
nvidia or ati card?
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:01
nvidia
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:05
thanks
modprobe did a lot of things and I am getting anxious
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:05
:D
fingers crossed!
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:06
ok clinfo says useful things now
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:06
what exactly did you run? i’d actually like to document that in the wiki at some point
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:06
YEAH!!!!!!
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:07
that sounds good :D
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:07
sudo apt-get install nvidia-346 nvidia-346-uvm nvidia-opencl-dev nvidia-modprobe
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:07
including the symlinking?
ah sorry, on the accepted answer, right
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:08
nope, just that line
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:08
nice
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:08
worked
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:08
sweet!
can you do me a favour as well? :)
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:08
very cool!
absolutely
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:09
CV gives you this output on the log window about the opencl devices, could you paste that for me and add what graphics card you use specifically?
i’m just collecting some stats on max alloc size, memory, etc
sorry

com.apple.eawt.Application
ClearGLWindow: GLProfile[GL4bc/GL4bc.hw]
1.0
1.0
1.0
Platform: NVIDIA CUDA {vendor: NVIDIA Corporation, version: OpenCL 1.2 CUDA 7.5.23, profile: FULL_PROFILE, extensions: [cl_khr_byte_addressable_store, cl_khr_icd, cl_khr_gl_sharing, cl_nv_compiler_options, cl_nv_device_attribute_query, cl_nv_pragma_unroll, cl_nv_copy_opts]}

#device: Quadro K4000 (NVIDIA CUDA) 
    *opencl version: OpenCL C 1.2  
    *driver version: 352.63 
    *max mem alloc size: 805126144 
    *global mem size: 3220504576 
    *max compute units: 4 
    *max clock freq: 810 
    *3d volume max width: 4096 
    *3d volume max height: 4096 
    *3d volume max depth: 4096 
    *isHostUnifiedMemory: false 

NVIDIA CUDA.Quadro K4000 L48k/G 3071M mem with 4 compute units
Quadro K4000 is best in platform NVIDIA CUDA
Device name: Quadro K4000 (NVIDIA CUDA)
Feb 10, 2016 1:06:46 PM com.nativelibs4java.opencl.JavaCL log
WARNING: clCreateImage3D is deprecated from OpenCL version 1.2 (detected version is 1.2)
Feb 10, 2016 1:06:46 PM com.nativelibs4java.opencl.JavaCL log
WARNING: clCreateImage2D is deprecated from OpenCL version 1.2 (detected version is 1.2)

another stupid question
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:12
thanks!
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:12
does CV support other projections than max intensity?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:12
not yet, but it might soon
what do you require?
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:12
alpha would be great
ideally with switches to uncouple intensity and alpha or use intensity only as alpha but not as intensity ;)
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:13
what do you mean specifically? voxel alpha based on intensity e.g.?
okay, noted
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:14
can you point me to where the projection code is done?
I may want to give it a shot
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:15
it’d actually be very cool if you could give an equation and it’d automatically compile a new kernel and project based on that
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:15
ok, will provide this
line 227 specifically
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:16
ok that's easy to understand, I'll get back when I have the math up
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:17
nice, thanks :)
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:17
will have to normalize by vecstep to make it look similar when subsampling---right?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:20
only if you do a proper recasting, not with maxproj i think
raycasting, i mean
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:21
true, max i is simpler
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:22
when i look at the code, an equation editor might actually not be that difficult, nice
okay, gotta go. thanks again for the gpu infos!
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:27
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:28
cool, thanks!
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:28
but it does not normalize by vecstep
let me see where to put this...
does CV do color?
btw, @skalarproduktraum you just tell me when you have to do something else, I am shamelessly exploiting to have your attention here
and the next question: max intensity can be accumulated/ refined for subsequent vecsteps, this is not true for alpha ray casting, is that a problem, i.e. does CV exploit that max intensity can be accumulated?
Ulrik Günther
@skalarproduktraum
Feb 10 2016 18:35
For multiple channels, yes
As the quads are then rendered with GL_MAX blend mode
Really gotta go now, but feel free to ask more questions, I'll answer when I'm back
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:37
cool, thanks!
@skalarproduktraum the normalization is simple, this line would have to be replaced by a *= Math.pow(1.0-alpha, vecstep);
Stephan Saalfeld
@axtimwalde
Feb 10 2016 18:45
i mean a *= Math.pow(1.0-alpha, step); in this code, vecstep in your code powr(1.0f-alpha, vecstep)
and you would have to accumulate the ray from back to front, is that what is happening right now?
(actually not, stopping where a == 1.0 sounds like a good idea...)
whatever, thanks for your help and looking forward to seeing CV raycast transparency rays :)