The greatest strength of the AnimalTracker API is that past its Graphical User Interface (GUI) intended for end users, it also includes an Application Programming Interface (API). Using the API, customized analysis software perfectly suiting specific individual needs can be created. Using other Java packages, databases and other tools can easily be integrated into the custom software.

Thanks to the abstract structure of AnimalTracker, algorithms that do not fulfill all needs can easily be changed without perturbing the integrity of the system. It is sufficient to rewrite only the parts of the code where a different function or mode of operation is required.

The complete source code of AnimalTracker (incl. comments) and the reference of the API are available on GitHub.

Below, the method of writing a new plugin using the AnimalTracker API is demonstrated using the Morris Water Maze plugin as an example.


An IDE is the most practical to use when writing a plugin. In this tutorial, the Eclipse program is used.

First, create a simple ImageJ plugin. Details regarding the creation of ImageJ plugins can be found in the tutorial.

After successfully creating an ImageJ plugin, download AnimalTracker_.jar and add it to the project's reference.

In this tutorial, the creation of graphic user interfaces (GUIs) will not be touched upon. The use of a widget toolkit is recommended, e.g. Swing, for which several Eclipse accessories are available.

Deciding which points to modify

Usually, there are two main reasons for the development of a new plugin:

  • a desire to accelerate the process of analysis by the exploitation of a feature that is characteristic of a given experimental setup.
  • a desire to supplement modules with new functions or algorithms.
In case of the development of the Water Maze plugin, examples can be found for both of these reasons.

Accelerating the process

The most obvious possibility to accelerate the analyzing process would be the automatic calculation of the pool's zones. In the current experiment, the pool will be divided into four outer and four inner quadrants. The size of these zones depends only on the outline of the pool and on the number defining the ratio between the inner and outer zones. Therefore it would be practical to write a function that requires the input of an oval ROI and a number between 0.1-0.9. Afterwards, the function would calculate the combinational operations of the Zone Designer Module autonomously.

Installing a new parameter of measurement

An important index in the case of the Morris Water Maze experimental system is the angle preference, which signifies the measure of difference between the direction of the tracked animal's course and the direction of the platform. This parameter isn't built into the AnimalTracker API, but can be easily created by the implementation of the Abstract Tracking Parameter Interface.