Skip to content

Example scripts and macro for scripting with the ACQUIFER Java API

Notifications You must be signed in to change notification settings

Luxendo/acquifer-IJ-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Examples for the ACQUIFER Java API

Welcome to the example repository for the ACQUIFER Java API !
This repo contains example jython scripts (.py) and ImageJ macros (.ijm), demonstrating classes available in the ACQUIFER java packages, and potential use cases.
The examples are often designed for running in Fiji, although data types and classes under the acquifer.core package can be used in any Java programing environment (ICY, QuPath...). In Fiji, the java packages required to run these tests are shipped as part of the ACQUIFER update site in Fiji (freely available upon request). The example scripts are also available after installation under the menu Acquifer > Examples.

The example scripts can be found in the subdirectory src\main\resources. Or directly go to one of the example subsections :

This repository also provides the click tools via the TcpIp toolbar : in the ACQUIFER menu, select Smart Imaging > TcpIp control toolbar

Download this repository

You can download this repository by clicking the green button "code" and select "Download zip".
Unzip the file, navigate to the subdirectory src\main\resources and drag and drop any of the script file on the Fiji toolbar to open it in the Fiji editor.
Alternatively if you use GitHub, you can fork this repository to customize these examples to your need.
You can also download single files by clicking the filename, then the "raw" button at the top left of the page, and finally right-click, save as.

Documentation

You can find more documentation about the different ressources used in these examples on the following pages:

Compilation

While the jar package contains a single IJ1-type plugin, the package should be compiled with Maven.
The example scripts are stored in the resource directory and listed accordingly in the plugins.config file (also part of the resource).
The compilation will automatically put these script files in the jar, so they can be loaded by the "Example launcher".

NOTE : Make sure in plugins.config that the plugin names dont have a white space after the " and before the comma.
Example

Here is fine
Acquifer>Examples>IMGUI internal C#, "Wait for (duration)", acquifer.examples.ExampleOpener("IMGUI_C#/WaitForDuration.cs")

Here is not fine, space after (duration)", the plugin does not show up
Acquifer>Examples>IMGUI internal C#, "Wait for (duration)" , acquifer.examples.ExampleOpener("IMGUI_C#/WaitForDuration.cs")

In the maven configuration define the following properties to have the jar automatically copied to the Fiji.app/jars directory (thanks to the parent scijava pom).

Maven build parameters

Set skip_test to true, to avoid issues with not fully implemented tests.

scijava.app : Path to Fiji.app  
enforcer.skip = true - this prevent issue since the package does not fullfill all requirements of the parent pom (licences..)  
scijava.deleteOtherVersions = older