Installation/Linux

From MiToBo

Jump to: navigation, search

Contents

Using MiToBo with ImageJ on a Linux-based system

Use MiToBo as shipped

Extract the zip file to a directory of your choice.
You can use MiToBo right away using the run.sh and oprunner.sh scripts.
Make sure that they have the 'x'-bit set before executing the scripts, i.e. do 'chmod u+x run.sh' and 'chmod u+x oprunner.sh' first.
If an UnsatisfiedLinkError occurs, please read the Native libraries section below.

Use MiToBo with an existing ImageJ installation

To use MiToBo with an existing ImageJ installation perform the following steps:

  1. copy the mitobo-plugins.jar to be found in the 'plugins/' folder of the MiToBo zip file to your 'ImageJ/plugins/' directory
  2. copy all jars in 'plugins/jars/' of the MiToBo zip file to your 'ImageJ/plugins/jars/' except the ij.jar and any jars already existing in your 'ImageJ/plugins/jars/' directory
    (Notice: MiToBo requires explicit versions of some jars, other versions may not work properly, see requirements.)
  3. copy the MiToBo_Runner.txt from the 'macros/toolsets/' directory in the MiToBo zip file to your 'ImageJ/macros/toolsets/' directory;
    then you can select the MiToBo toolset from the list of available sets by clicking on the arrows button on the right side of the ImageJ standard toolbar
  4. Make the native libraries in lib/ of the MiToBo zip file available to Java (see the Native libraries section below)

You can still use the run.sh and oprunner.sh scripts if you copy them to your 'ImageJ/' directory.

Native libraries

Some operators of MiToBo use native code via the Java Native Interface (JNI).
The 'lib/' directory in the zip file provides precompiled JNI-libraries for 32- (lib/lib32) and 64-Bit (lib/lib64) Linux systems.
For using the native code add the libraries appropriate for your system to the library path.
The path to the native libraries must be available to any java application which uses MiToBo operators that depend on these libraries.

  • The run.sh and oprunner.sh scripts both add the 'lib/lib32' or 'lib/lib64' directory (depending on your architecture)
    to the LD_LIBRARY_PATH, thus, you do not have to configure the LD_LIBRARY_PATH manually.
  • If you run ImageJ with MiToBo or the OpRunner in another way, the directories of native libraries can be passed to Java in any of the following two ways:
  • The LD_LIBRARY_PATH environment variable must contain the path to the native libraries used
  • The call to Java has to be augmented with an option to tell where native libraries reside:
  java -Djava.library.path=/path/to/libs1:/path/to/libs2[:...] ...
For example, you can run ImageJ with MiToBo on a 32-Bit system with the unzipped MiToBo structure, but not the run.sh script, with the following command:
  java -Djava.library.path=lib/lib32:/usr/lib -cp plugins/jars/ij.jar ij.ImageJ
Configuring the LD_LIBRARY_PATH and running java with the -Djava.library.path option are equivalent.



Personal tools