Posted by
birgerro on
Aug 17, 2006; 8:54am
URL: http://imagej.273.s1.nabble.com/Distance-Between-Lines-a-plugin-for-ImageJ-tp3701802.html
I have written a small plugin for ImageJ for measuring the average
distance between two lines (which do not have to be straight). I used
this plugin to measure the average width of screen-printed metallic
lines for solar cells, and I thought that it might be interesting for
other people also, if nothing else then as an example of plugin
programming. The plugin is a bit rough, so any ideas to make it more
user friendly would be appreciated.
The way the plugin is suposed to work, is this:
1) First you need to set the scale from the images by measuring a known
length (calibration sample) with
Analyze->Set Scale...
2) Then you load a image you want to measure into ImageJ
3) Start the plugin with (the name depends on where you have installed
the plugin)
Plugins->Distance Between Polylines
A popup giving instructions should appear.
4) As per the instructions in the popup, first select the straight line
selection tool in the tool window, and draw a line along the finger you
want to measure. Then press [Enter].
Sometimes ImageJ has a problem with focusing the right window, so if
the message in the popup doesn't change at this point, you have to make
the image window active again, and press [Enter] once more.
5) Select one of the line selection tools (straight line, segmented
line or freehand) and draw a line along one edge of the finger. Then
press [Enter] again.
6) Draw a line along the other edge of the finger, and press [Enter]
again.
7) The average distance between the drawn lines is shown in the
instruction popup, and also in the Average distances popup.
If you want any of the drawn lines to appear on the image, you can use
Edit->Draw before pressing [Enter] after drawing a line. You probably
also should save the image under a new name.
---
With regards,
Birger Retterstøl Olaisen
PhD-student, Institute for Energy Technology