Search code examples
javamacrosimagej

When running OrientationJ from macro, what causes the "multiple points exception"?


I'm trying to run the orientationJ from macro following the directions by the developers http://bigwww.epfl.ch/demo/orientation/

// Call the Measure plugin from a ImageJ macro
makeRectangle(250, 250, 50, 50);
run("OrientationJ Measure", "sigma=.0.0");
// sigma: standard deviation of the Laplacian of Gaussian prefilter
// The results are displayed on the log window of ImageJ in tab-separated format

However, I'm getting the error below. How do I fix this?

ImageJ 1.48v; Java 1.6.0_20 [64-bit]; Windows 7 6.1; 6666K of 3068MB (<1%)

java.lang.NumberFormatException: multiple points
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1084)
    at java.lang.Double.parseDouble(Double.java:510)
    at OrientationJ_Measure.run(OrientationJ_Measure.java:62)
    at ij.IJ.runUserPlugIn(IJ.java:199)
    at ij.IJ.runUserPlugIn(IJ.java:210)
    at ij.IJ.runPlugIn(IJ.java:163)
    at ij.Executer.runCommand(Executer.java:131)
    at ij.Executer.run(Executer.java:64)
    at ij.IJ.run(IJ.java:269)
    at ij.macro.Functions.doRun(Functions.java:590)
    at ij.macro.Functions.doFunction(Functions.java:89)
    at ij.macro.Interpreter.doStatement(Interpreter.java:226)
    at ij.macro.Interpreter.doStatements(Interpreter.java:214)
    at ij.macro.Interpreter.run(Interpreter.java:111)
    at ij.macro.Interpreter.run(Interpreter.java:81)
    at ij.macro.Interpreter.run(Interpreter.java:92)
    at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:153)
    at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:137)
    at ij.plugin.Macro_Runner.run(Macro_Runner.java:34)
    at ij.IJ.runPlugIn(IJ.java:169)
    at ij.Executer.runCommand(Executer.java:131)
    at ij.Executer.run(Executer.java:64)
    at java.lang.Thread.run(Thread.java:619)

Solution

  • run("OrientationJ Measure", "sigma=.0.0");
    

    Your sigma value has two decimal points. Remove the first one.

    java.lang.NumberFormatException: multiple points

    It is complaining about that. Probably a typo in the example.