Login  Register

Re: Scale Bar units

Posted by Ed Simmons on Aug 18, 2014; 11:49am
URL: http://imagej.273.s1.nabble.com/Scale-Bar-units-tp5009167p5009249.html

Hi Wayne,

On 18/08/2014 00:57, Rasband, Wayne (NIH/NIMH) [E] wrote:

> 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.java
>
> To 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

I have just tried this with the IJ bundled with a recent MM nightly
build and it gives me an error when trying to compile and run.
The error says
Plugin or class not found: "Scale_Bar"
(java.lang.ClassNotFoundException: Scale_Bar)

The same code compiles fine if it is named ScaleBar.java (the
appropriate change of class name has been made) but this doesn't result
in an item in the menu.

Any ideas? Thanks!
Ed

--
[hidden email]
http://www.esimgagingsolutions.com

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html