StuartLab / MiNA

MiNA (Mitochondrial Network Analysis) is a project aimed at making the analysis and characterization of mitochondrial network morphology more accurate, faster, and objective. This project currently consists of a set of Python scripts (and JAVA for the user interface) for the Fiji distribution of ImageJ.
GNU General Public License v3.0
26 stars 8 forks source link

Error: Traceback (most recent call last) #12

Open kcabolis opened 4 years ago

kcabolis commented 4 years ago

I recently downloaded and used the MiNA plug in successfully. However today every time I try to use it I get the following error message. I have tried uninstalling it and re-installing and this did not help.

ERROR] Traceback (most recent call last): File "Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py", line 291, in File "Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py", line 136, in run at net.imglib2.histogram.Real1dBinMapper.min(Real1dBinMapper.java:237) at net.imglib2.histogram.Real1dBinMapper.center(Real1dBinMapper.java:265) at net.imglib2.histogram.Real1dBinMapper.getCenterValue(Real1dBinMapper.java:151) at net.imglib2.histogram.Real1dBinMapper.getCenterValue(Real1dBinMapper.java:49) at net.imglib2.histogram.Histogram1d.getCenterValue(Histogram1d.java:300) at net.imagej.ops.threshold.AbstractComputeThresholdHistogram.compute(AbstractComputeThresholdHistogram.java:53) at net.imagej.ops.threshold.AbstractComputeThresholdHistogram.compute(AbstractComputeThresholdHistogram.java:41) at net.imagej.ops.threshold.ApplyThresholdMethod$IsoData.getThreshold(ApplyThresholdMethod.java:155) at net.imagej.ops.threshold.ApplyThresholdMethod$IsoData.getThreshold(ApplyThresholdMethod.java:134) at net.imagej.ops.threshold.AbstractApplyThresholdIterable.compute(AbstractApplyThresholdIterable.java:52) at net.imagej.ops.threshold.AbstractApplyThresholdIterable.compute(AbstractApplyThresholdIterable.java:43) at net.imagej.ops.special.hybrid.UnaryHybridCF.calculate(UnaryHybridCF.java:61) at net.imagej.ops.special.hybrid.UnaryHybridCF.run(UnaryHybridCF.java:71) at net.imagej.ops.special.hybrid.UnaryHybridCF.run(UnaryHybridCF.java:97) at org.scijava.command.CommandModule.run(CommandModule.java:199) at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:950) at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: invalid bin position specified

at org.python.core.Py.JavaError(Py.java:552)
at org.python.core.Py.JavaError(Py.java:543)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:190)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:206)
at org.python.core.PyObject.__call__(PyObject.java:515)
at org.python.core.PyObject.__call__(PyObject.java:519)
at org.python.core.PyMethod.__call__(PyMethod.java:156)
at org.python.pycode._pyx3.run$2(Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py:287)
at org.python.pycode._pyx3.call_function(Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyBaseCode.call(PyBaseCode.java:308)
at org.python.core.PyFunction.function___call__(PyFunction.java:471)
at org.python.core.PyFunction.__call__(PyFunction.java:466)
at org.python.core.PyFunction.__call__(PyFunction.java:456)
at org.python.pycode._pyx3.f$0(Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py:291)
at org.python.pycode._pyx3.call_function(Plugins/StuartLab/MiNA_Scripts/MiNA_Analyze_Morphology.py)
at org.python.core.PyTableCode.call(PyTableCode.java:171)
at org.python.core.PyCode.call(PyCode.java:18)
at org.python.core.Py.runCode(Py.java:1614)
at org.python.core.__builtin__.eval(__builtin__.java:497)
at org.python.core.__builtin__.eval(__builtin__.java:501)
at org.python.util.PythonInterpreter.eval(PythonInterpreter.java:259)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:57)
at org.python.jsr223.PyScriptEngine.eval(PyScriptEngine.java:31)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:264)
at org.scijava.script.ScriptModule.run(ScriptModule.java:160)
at org.scijava.module.ModuleRunner.run(ModuleRunner.java:168)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:127)
at org.scijava.module.ModuleRunner.call(ModuleRunner.java:66)
at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:228)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.IllegalArgumentException: invalid bin position specified at net.imglib2.histogram.Real1dBinMapper.min(Real1dBinMapper.java:237) at net.imglib2.histogram.Real1dBinMapper.center(Real1dBinMapper.java:265) at net.imglib2.histogram.Real1dBinMapper.getCenterValue(Real1dBinMapper.java:151) at net.imglib2.histogram.Real1dBinMapper.getCenterValue(Real1dBinMapper.java:49) at net.imglib2.histogram.Histogram1d.getCenterValue(Histogram1d.java:300) at net.imagej.ops.threshold.AbstractComputeThresholdHistogram.compute(AbstractComputeThresholdHistogram.java:53) at net.imagej.ops.threshold.AbstractComputeThresholdHistogram.compute(AbstractComputeThresholdHistogram.java:41) at net.imagej.ops.threshold.ApplyThresholdMethod$IsoData.getThreshold(ApplyThresholdMethod.java:155) at net.imagej.ops.threshold.ApplyThresholdMethod$IsoData.getThreshold(ApplyThresholdMethod.java:134) at net.imagej.ops.threshold.AbstractApplyThresholdIterable.compute(AbstractApplyThresholdIterable.java:52) at net.imagej.ops.threshold.AbstractApplyThresholdIterable.compute(AbstractApplyThresholdIterable.java:43) at net.imagej.ops.special.hybrid.UnaryHybridCF.calculate(UnaryHybridCF.java:61) at net.imagej.ops.special.hybrid.UnaryHybridCF.run(UnaryHybridCF.java:71) at net.imagej.ops.special.hybrid.UnaryHybridCF.run(UnaryHybridCF.java:97) at org.scijava.command.CommandModule.run(CommandModule.java:199) at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:950) at net.imagej.ops.OpEnvironment.run(OpEnvironment.java:136) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.python.core.PyReflectedFunction.call(PyReflectedFunction.java:188) ... 31 more

RodoVJ commented 4 years ago

Hello, would you mind providing some extra information?

  1. Was this installed using the update site as described in the wiki page?

  2. What version of FIJI do you have installed?

3.What threshold option are you using and what type of format are the images?

Also when was the last time MiNA worked for you and have you made any additional changes, installations since then? Any extra information would help.

Thank you

kcabolis commented 4 years ago

Hello,

  1. I followed all the instructions provided in the wiki page.
  2. I have the latest version of FIJI for OS X (2.0.0-rc-69/1.52p)
  3. I am using the isoData threshold option (either through image>adjust>auto threshold OR process>binary>make binary), my images are converted to 8-bit, then they are pre-processed, and finally they are thresholded using IsoData (black objects on white background).
  4. The last time I used MiNA and it worked was the day before yesterday. As far as I am aware - I have not made any additional changes or installations since then.

Hopefully this helps- Please let me know if you need any further info.

RodoVJ commented 4 years ago

There is no need to binarize an image before running MiNA since it will automatically do so already. https://github.com/StuartLab/MiNA/blob/dc02fc7c25738c323755bcc6461bf4faeec2af93/src/MiNA_Analyze_Morphology.py#L136-L137 The error seems to come from the manual thresholding that you are doing. There is also no need for this since you can choose the thresholding that you want to do through the thresholding Op menu MiNA offers. Please tell me if you have any other issues!