Macros - ekatrukha/BigTrace GitHub Wiki

The plugin is scriptable, meaning that some functionality can be used in ImageJ/FIJI macro environment via extension interface.

For that, we implemented a set of commands/functions starting from "Ext." namespace.
To start, you always need to run BigTrace on some image file and then call the function, for example:

run("Open 3D image", "open=C:/path_to/my_file.tif"); //open my_file.tif in BigTrace
Ext.btLoadROIs("C:/path_to/Rois_btrois.csv","Clean"); //load ROIs from file
Ext.btClose(); //close BT

The description of available commands is shown below.
If you want new ones to be implemented or tweak existing ones, please reach out.

Ext.btLoadROIs (String sFile, String sMode)

Takes two string arguments as an input:
Ext.btLoadROIs("C:/path_to/Rois_btrois.csv","Clean");
The first parameter is full path to ROIs csv file. The second parameter can be "Clean", i.e. delete all ROIs and load new ones from the file.
Or it can be "Append", so the newly loaded ROIs will be added to existing ones.

Ext.btStraighten (Integer nAxis, String sOutputFolder)

This command runs straighten function on all visible ROIs in the list.
It takes an integer and a string as arguments:
Ext.btStraighten(1, "C:/path_to_store_output/");
The integer specifies the axis of the output, which becomes the centerline of a ROI curve.
The value of 0 corresponds to the X axis, 1 to Y and 2 to Z.
Note that the output depends on the Intensity Interpolation and ROI Shape Interpolation,
which can be specified by the two functions below.

Ext.btShapeInterpolation (String sShapeInterpolation, Integer nSmoothWindow)

Specifies current ROI Shape Interpolation.
The first string parameter should be either "Voxel", "Smooth" or "Spline".
The second integer parameter specifies smoothing window.

Ext.btIntensityInterpolation (String sIntInterpolation)

Sets current intensity interpolation.
A single string parameter with possible values of "Neighbor", "Linear" or "Lanczos".

Ext.btClose()

Closes the current session of BigTrace (if there is one).