[ImageJ-bugs] [Bug 1067] New: microns are shown as µm x um in the image view!

bugzilla at fiji.sc bugzilla at fiji.sc
Mon May 11 04:54:40 CDT 2015


http://fiji.sc/bugzilla/show_bug.cgi?id=1067

            Bug ID: 1067
           Summary: microns are shown as µm x um in the image view!
           Product: ImageJ
           Version: unspecified
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: trivial
          Priority: P5
         Component: Common
          Assignee: ctrueden at wisc.edu
          Reporter: derigo at impex.co.at
                CC: imagej-bugs at imagej.net

In Calibration.java if one looks at function setUnit ( or setXUnit ) the unit
gets sanintized! => if you call it with "um" it changes into "µm"

BUT: for setYUnit and setZUnit this is not done!
SUGGESTED BUGFIX:

private static String sanitizeUnit( String unit ) 
{
    if (unit==null || unit.equals("")) {
    return "pixel";
    } else {
    if (unit.equals("um")) return "\u00B5m";
        return unit;
    }
}

/** Sets the default length unit (e.g. "mm", "inch"). */
public void setUnit(String unit) {
     this.unit = sanitizeUnit( unit );
     units = null;
}

/** Sets the X length unit. */
public void setXUnit(String unit) {
    setUnit(unit);
}

/** Sets the Y length unit. */
public void setYUnit(String unit) {
        yunit = sanitizeUnit( unit );
}

/** Sets the Z length unit. */
public void setZUnit(String unit) {
     zunit = sanitizeUnit( unit );
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20150511/671383c7/attachment.html>


More information about the Imagej-bugs mailing list