Login  Register

Line length and tracing - exception window

Posted by David Chatelet on Aug 25, 2009; 9:36pm
URL: http://imagej.273.s1.nabble.com/Line-length-and-tracing-exception-window-tp3691355.html

Hi,
I am trying to measure the vein length of leaves but ImageJ stops and a
exception window open. Here is what I do:
First I open a tiff or jpeg image of a scale bar. I trace a certain
distance, go to the set scale window, enter the known length and unit,
check "global" and click OK. Then I open a tiff image showing a leaf
venation (same resolution and dimension than the scale bar image), select
the polygon selection tool, increase the line width to 10 and change its
color so I can see it. First I trace a box on my image, measure its
surface area (M key) and embed it on my image (D key). Then I reset the
result window, select the segmented line tool and start tracing lines
following the vein pattern. Everytime I stop, I press the M key to measure
the length of the line I just traced, followed by the D key to embed the
line on my image. Problems: (1) the lines (traced with the segmented line
tool) don’t appear on the image when I press D and (2) after about 10
measurements, ImageJ stop and an exception window appear with the
following message:
java.lang.ArrayIndexOutOfBoundsException: 0
at ij.gui.PolygonRoi.fitSplineForStraightening(PolygonRoi.java:617)
at ij.plugin.Straightener.straightenLine(Straightener.java:98)
at ij.plugin.filter.Analyzer.measureLength(Analyzer.java:327)
at ij.plugin.filter.Analyzer.measure(Analyzer.java:203)
at ij.plugin.filter.Analyzer.run(Analyzer.java:86)
at ij.plugin.filter.PlugInFilterRunner.processOneImage
(PlugInFilterRunner.java:245)
at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
at ij.IJ.runPlugIn(IJ.java:150)
at ij.Executer.runCommand(Executer.java:121)
at ij.Executer.run(Executer.java:58)
at java.lang.Thread.run(Thread.java:619)  

What is going on? I have Vista home premium 32bit and this method was
working fine with ImageJ 1.38. But I upgraded ImageJ recently and it is no
good anymore. Any help would be greatly appreciated. Thanks.

David