Re: Scale Bar units
Posted by
Rasband, Wayne (NIH/NIMH) [E] on
Aug 17, 2014; 11:55pm
URL: http://imagej.273.s1.nabble.com/Scale-Bar-units-tp5009167p5009244.html
On Aug 13, 2014, at 7:21 AM, Magnar Slocombe wrote:
> Hi,
>
> We recommend ImageJ to our customers but some have asked if it is possible
> to display different units on the Scale Bar... I know the Scale Bar displays
> whatever units the calibration is in but is it possible to calibrate an
> image in microns but add a scale bar in mm (or even cm)?
>
> To explain, we calibrate all of the microscope images in microns but many
> Histopathologists like to do measurements in mm (and sometimes cm) at low
> power magnifications as this is a unit of measurement that the surgical team
> are more familiar with (they still use microns at high power).
>
> Is it possible to add a "units" (um, mm, cm) selector to the scale bar (I
> guess it would need to assume the image is already calibrated in microns)?
> Are we able to get hold of the source code for the Scale Bar... plugin and
> modify it for this purpose?
The source code for the Analyze>Tools>Scale Bar command is available at
http://imagej.nih.gov/ij/source/ij/plugin/ScaleBar.javaTo create a customizable user plugin, save the source code in the plugins folder as Scale_Bar.java, open it in ImageJ, change
package ij.plugin;
to
import ij.plugin.PlugIn;
Change
public class ScaleBar implements PlugIn {
to
public class Scale_Bar implements PlugIn {
and re-compile using the Plugins>Compile and Run command.
-wayne
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html