These are chat archives for fiji/fiji

27th
Apr 2017
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 13:40
@ctrueden What exactly does the Fiji launcher do? Fiji launcher as in i.e. Fiji.app/ImageJ-linux64 do? I am trying to make a launcher from python/imglyb that knows about all the jars and plugins in the Fiji.app directory. If you have a github link to the source that is good enough for me.
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 13:47
Curtis Rueden
@ctrueden
Apr 27 2017 14:01
@hanslovsky Regarding the shell scripting: the issue is that cat nonexistentFile returns a non-zero error code, so then, the statement test "condition" && cat nonexistentFile" returns non-zero, so then the || triggers and the intended else part ALSO runs.
So the formulation test <condition> && <consequent> || <otherwise> is fundamentally dangerous.
@hanslovsky Regarding the launcher: the launcher which was originally developed as part of Fiji is the ImageJ Launcher now, and has been for several years.
The executable ImageJ-<platform>.<ext> are built from that repository.
The executables fiji-<platform>.<ext> are thin wrappers which do nothing else but call the ImageJ- versions. They exist to keep the Fiji icon, and for backwards compatibility.
Note that the ImageJ Launcher is slated for demolition (imagej/imagej-launcher#33), in favor of a Java-based launch bootstrapper, kicked off by the JavaFX launcher.
For now, calling the ImageJ launcher from Python is your best bet, though.
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 14:06
I'll look into that, thanks!
Jan Eglinger
@imagejan
Apr 27 2017 15:33

@ctrueden

So the formulation test <condition> && <consequent> || <otherwise> is fundamentally dangerous.

I've seen codacy (and likely also other code quality checking tools) warning about this kind of patterns via shellcheck: https://github.com/koalaman/shellcheck/wiki/SC2015

Curtis Rueden
@ctrueden
Apr 27 2017 15:55
@imagejan Cool, thanks for the tip!
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 15:55
:+1:
All this was very educational, thanks @ctrueden and @imagejan
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 18:28
@ctrueden I just started ImageJ/Fiji from an ipython qtconsole and made a matplotlib plot of data that came from an ImageProcessor. Unfortunately, shared memory between ImageProcessor and numpy is not possible because that works only for Java data structures backed by unsafe.
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 18:52
I am not familiar with ImageJ2: Is ImageProcessor being used in ImageJ2 at all?
Jean-Yves Tinevez
@tinevez
Apr 27 2017 18:54
no.
Hadrien Mary
@hadim
Apr 27 2017 18:54
Nope.
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 18:54
Wonderful. Thanks guys!
Hadrien Mary
@hadim
Apr 27 2017 18:54
That is IJ1 specific.
Try with Img or Dataset
more low level with RandomAccessibleInterval
Philipp Hanslovsky
@hanslovsky
Apr 27 2017 18:57
That's good news because -- as long as the ImageJ2 container is an ArrayImg that is backed by unsafe -- numpy and ImageJ2 can share memory. If it is an arbitrary RandomAccessibleInterval a copy is required.
Curtis Rueden
@ctrueden
Apr 27 2017 21:38
@hanslovsky You already know ImageJ2 because you know ImgLib2. :+1:
The other major piece of IJ2 is the SciJava Common application container and plugins.