Help with macro error

Hello everyone,
I am trying to run a Java script (developed by a lab in Japan) to check microtubule angles and parallelness. But when i run the script i get an macro error message (below)

Here is the Java script which i downloaded here -
I already have the KbiPlugins (mentioned in the link above installed in Fiji) . I am also not sure about where to install the ‘scala_library’ in Fiji (again mentioned in the link above)

// Measure the mean angle and parallelness of fibers in fluorescence image.
// Output (in Results table):
//   * z: z-coordinates (slice number, 1-origin)
//   * theta: mean angle in degree
//   * normAvgRad: parallelness (range: 0-1)
//   * totalPair: number of neighbored-pixel pairs including skeletonize image.
// Requirements
//   * ImageJ
//   * KBI (KashiwaBioimageInformatics) ImageJ plugins
// Copyright (C) 2010 Natsumaro Kutsuna
// KashiwaBioimageInformatics, Hasezawa Lab,
// Department of Integrated Biosciences,
// Graduate School of Frontier Sciences,
// The University of Tokyo

Dialog.create("angle measurements for fiber");
Dialog.addNumber("bandpassFrom", 9);
Dialog.addNumber("bandpassTo", 12);
Dialog.addCheckbox("debug", false);
bpFrom = Dialog.getNumber();
bpTo = Dialog.getNumber();
debug = Dialog.getCheckbox();


function dupForDebug(title) {
    if (debug) {
        processId = getImageID();
        run("Duplicate...", "title=" + title);

run("Kbi Filter2d", "filter=bandPassOps bpmode=gaussian low=" + bpFrom + " hi=" + bpTo + " postproc=none overwrite");
run("Kbi Filter2d", "filter=thresholdOps thrmode=otsu eightconn border=bg thrisbg overwrite");
run("Kbi Filter2d", "filter=filtersForBilevel bilevelmode=bilevelThin isremovedots ispostelong overwrite");
run("Kbi LinesAngle", "mode=eachSlice");

Could someone help me out with this error?

Hi @Praveen

just rename the variable “debug”. It is obviously a system variabe (or function) which cannot be used as a normal variable…



debug is an apparently undocumented macro function:

  • In the ImageJ 1.x text editor, it opens the debug window.
  • In the script editor, it is highlighted as a reserved keyword, but executing it leads to the error message you observed, which clearly is a bug.

Thanks Robert. That seems to work? But like @imagejan mentioned, is this really a bug?