Documentation of 'ij.macro.Interpreter' Java class
Interpreter
ij.macro

Class Interpreter

  • All Implemented Interfaces:
    MacroConstants


    public class Interpreter
    extends java.lang.Object
    implements MacroConstants
    This is the recursive descent parser/interpreter for the ImageJ macro language.
    • Field Detail

      • batchMode

        public static boolean batchMode
    • Constructor Detail

      • Interpreter

        public Interpreter()
    • Method Detail

      • run

        public void run(java.lang.String macro)
        Interprets the specified string.
      • run

        public java.lang.String run(java.lang.String macro,
                                    java.lang.String arg)
        Runs the specified macro, passing it a string argument and returning a string value.
      • run

        public void run(Program pgm)
        Interprets the specified tokenized macro file starting at location 0.
      • run

        public void run(int location)
        Runs an existing macro starting at the specified program counter location.
      • runMacro

        public void runMacro(Program pgm,
                             int macroLoc,
                             java.lang.String macroName)
        Interprets the specified tokenized macro starting at the specified location.
      • runBatchMacro

        public ImagePlus runBatchMacro(java.lang.String macro,
                                       ImagePlus imp)
        Runs Process/Batch/ macros.
      • saveGlobals

        public void saveGlobals(Program pgm)
        Saves global variables.
      • updateDebugWindow

        public TextWindow updateDebugWindow(java.lang.String[] variables,
                                            TextWindow debugWindow)
      • abort

        public static void abort()
        Aborts currently running macro.
      • abort

        public static void abort(Interpreter interp)
        Absolete, replaced by abortMacro().
      • abortMacro

        public void abortMacro()
        Aborts this macro.
      • getInstance

        public static Interpreter getInstance()
      • isBatchMode

        public static boolean isBatchMode()
      • addBatchModeImage

        public static void addBatchModeImage(ImagePlus imp)
      • removeBatchModeImage

        public static void removeBatchModeImage(ImagePlus imp)
      • activateImage

        public static void activateImage(ImagePlus imp)
      • getBatchModeImageIDs

        public static int[] getBatchModeImageIDs()
      • getBatchModeImageCount

        public static int getBatchModeImageCount()
      • getBatchModeImage

        public static ImagePlus getBatchModeImage(int id)
      • getLastBatchModeImage

        public static ImagePlus getLastBatchModeImage()
      • setAdditionalFunctions

        public static void setAdditionalFunctions(java.lang.String functions)
        The specified string, if not null, is added to strings passed to the run() method.
      • getAdditionalFunctions

        public static java.lang.String getAdditionalFunctions()
      • getBatchModeRoiManager

        public static RoiManager getBatchModeRoiManager()
        Returns the batch mode RoiManager instance.
      • isBatchModeRoiManager

        public static boolean isBatchModeRoiManager()
        Returns true if there is an internal batch mode RoiManager.
      • setDebugger

        public void setDebugger(Debugger debugger)
      • getDebugger

        public Debugger getDebugger()
      • setDebugMode

        public void setDebugMode(int mode)
      • getLineNumber

        public int getLineNumber()
      • getVariables

        public java.lang.String[] getVariables()
        Returns the names of all variables and functions with human-readable annotations
      • getVariableNames

        public java.lang.String[] getVariableNames()
        Returns the names of all variables, without any annotation
      • done

        public boolean done()
      • wasError

        public boolean wasError()
      • setVariable

        public void setVariable(java.lang.String name,
                                double value)
      • setVariable

        public void setVariable(java.lang.String name,
                                java.lang.String str)
      • getVariable

        public double getVariable(java.lang.String name)
      • getVariable2

        public double getVariable2(java.lang.String name)
      • getStringVariable

        public java.lang.String getStringVariable(java.lang.String name)
      • getVariableAsString

        public java.lang.String getVariableAsString(java.lang.String name)
      • showArrayInspector

        public void showArrayInspector(int row)
        Shows array elements after clicking an array variable in Debug window N. Vischer
        Parameters:
        row - Debug window row of variable to be shown
      • updateArrayInspector

        public void updateArrayInspector()
        Updates Array inspector if variable exists, otherwise closes ArrayInspector
      • nonBatchMacroRunning

        public static boolean nonBatchMacroRunning()
      • setApplyMacroTable

        public void setApplyMacroTable(ResultsTable rt)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.