Hi,
I’m trying to analyse an image to get a GabRat value using ImageJ 1.53 (NIH version). I’ve opened an image drawn a rectangle, selected it in the ROI manager than tried to run:
plugins > micatoolbox > Image Analysis > GabRat Disruption ROIs
I get the following error. Am I doing something wrong?
ImageJ 1.53o; Java 13.0.10 [64-bit]; Windows 10 10.0; 10MB of 12238MB (<1%)
java.lang.NullPointerException
at GabRat_Disruption.run(GabRat_Disruption.java:175)
at ij.IJ.runUserPlugIn(IJ.java:243)
at ij.IJ.runPlugIn(IJ.java:204)
at ij.Executer.runCommand(Executer.java:151)
at ij.Executer.run(Executer.java:69)
at ij.IJ.run(IJ.java:325)
at ij.IJ.run(IJ.java:336)
at ij.macro.Functions.doRun(Functions.java:702)
at ij.macro.Functions.doFunction(Functions.java:98)
at ij.macro.Interpreter.doStatement(Interpreter.java:281)
at ij.macro.Interpreter.doBlock(Interpreter.java:715)
at ij.macro.Interpreter.doStatement(Interpreter.java:326)
at ij.macro.Interpreter.doFor(Interpreter.java:637)
at ij.macro.Interpreter.doStatement(Interpreter.java:308)
at ij.macro.Interpreter.doBlock(Interpreter.java:715)
at ij.macro.Interpreter.doStatement(Interpreter.java:326)
at ij.macro.Interpreter.doIf(Interpreter.java:1116)
at ij.macro.Interpreter.doStatement(Interpreter.java:302)
at ij.macro.Interpreter.doBlock(Interpreter.java:715)
at ij.macro.Interpreter.doStatement(Interpreter.java:326)
at ij.macro.Interpreter.doFor(Interpreter.java:637)
at ij.macro.Interpreter.doStatement(Interpreter.java:308)
at ij.macro.Interpreter.doStatements(Interpreter.java:267)
at ij.macro.Interpreter.run(Interpreter.java:163)
at ij.macro.Interpreter.run(Interpreter.java:93)
at ij.macro.Interpreter.run(Interpreter.java:107)
at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:162)
at ij.plugin.Macro_Runner.runMacroFile(Macro_Runner.java:146)
at ij.plugin.Macro_Runner.run(Macro_Runner.java:61)
at ij.IJ.runPlugIn(IJ.java:210)
at ij.Executer.runCommand(Executer.java:151)
at ij.Executer.run(Executer.java:69)
at java.base/java.lang.Thread.run(Thread.java:830)
Ah, this could be caused by one of two issues:
I’m not sure the GabRat process likes rectangles. Convert the rectangle to an “area” selection perhaps and try that.
Also, if the selection is too close to the edge of the image (for the sigma value you selected), it will throw an error. This is because the GabRat process measures the pixels from the surrounds of the target (based on sigma), and it doesn’t know what to do if there aren’t any pixels available. You could try creating a larger, buffered image (though I’m not sure how you’d fill the enlarged image edges – what would you use?), or make sigma smaller.
Cheers,
Jolyon