ThreeB 1.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

Compiling the programs

In order to compile the project, you will need to download and install the following libraries:

- TooN http://www.edwardrosten.com/cvd/toon.html
- libcvd http://www.edwardrosten.com/cvd/
- gvars3 http://www.edwardrosten.com/cvd/gvars3.html

The program is portable and is well tested under Linux and OSX. It will also compile under Windows using cygwin or MinGW.

The program can be built using the usual method for compiling under Linux:

    ./configure && make

## Compiling the ImageJ plugin

The plugin is provided pre-compiled from the project website.

There are two ways of building the plugin, manual and automatic. If you want to make changes to the plugin, then use manual building. If you want to automatically build the plugin for several platforms, then use automatic building.

### Manual

The basic build instructions are the same as for the commandline program. You will also need the JDK (Java Development Kit) and ImageJ installed.

You will have to locate where your system has installed the JDK. If it is not in /usr/lib/jvm/java-6-openjdk/include, you will have to specify the path:

First configure the system:

    ./configure --with-imagej=/path/to/ImageJ/ij.jar --with-jni=/path/to/jdk/include

You will also need to make sure that the JDK programs (javac, havah, etc) are in your path. The configure script will attempt to detect the location of the JNI headers. If it fails, you will need to specify `--with-jni=/path/to/jdk/include`

To build the JAVA part:

    make three_B.jar

To build the plugin (on Linux):

    make libthreeB_jni.so DYNAMIC_PLUGIN=1

Note that if you do not specify `DYNAMIC_PLUGIN`, then the makefile will try to build a plugin with some dependencies statically linked in which will almost certainly fail unless you have set the system up to support such an operation.

On MinGW:

    make threeB_jni.dll

Now copy three_B.jar and libthreeB_jni.so into your ImageJ plugins directory.

### Automatic Build

The automatic build method is very slow and is designed to be able to repeatably build plugins for 32 and 64 bit Linux and Windows. It is also designed to build the plugin with as many static dependencies as possible so that only a single DLL/so needs to be shipped per system.

The script operates by building a temporary install of Ubuntu 10.04 LTS, and using that to compile all variants of the plugin.

You will need a Debian based system (or a system on which the command `debootstrap` works) and root access.

Tha automatic build system makes use of cLAPACK, rather than LAPACK as the LAPACK part is not speed critical and it is easier to build CLAPACK without additional external dependencies.

To build, run the following commands:

    #First make a tar.gz of the source code
    bash make_dist.sh

    #Now execute the automatic build process
    bash build_plugin.sh

The build takes a long time, and you should probably edit `build_plugin.sh` to point the installer at an Ubuntu mirror somewhere near to where you are.

At the end of the build, the script will print out a directory name like:

    dist-123908

A fresh copy of the plugin DLL and shared object will be present in that directory named.