<html>
    <head>
      <base href="http://fiji.sc/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Incorrect units for y and z; subsequent Bio-Formats bug"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1092">1092</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incorrect units for y and z; subsequent Bio-Formats bug
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Fiji
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P4
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Plugins
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>imagej-bugs@imagej.net
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jan.eglinger@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jan.eglinger@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This might actually be _two_ bugs.

1) Running 'Image > Properties...' or 'Analyze > Set Scale...' to change the
units and scale will change only the units for x, *not* the units for y and z
directions.
The same problem apparently occurs when saving a virtual stack (with micron
calibration) to a tiff stack: the resulting file will have microns in x and
pixels in y and z.

2) As a consequence, when you save such a "mis-scaled" image and read it with
Bio-Formats Importer, the stack trace pasted below is thrown. Unfortunately,
this breaks any use of the Grid/Collection Stitching plugin because it
exclusively uses Bio-Formats to open even "Standard ImageJ" tiff files.
I suggest that the Bio-Formats Importer should be a bit more forgiving and
issue a warning only, instead of throwing an exception here.

This macro code illustrates both issues:

// ******************************************************
  tmp = getDirectory("temp");
  file_name = "calibration_bug.tif"

  newImage("Calibration_test", "8-bit black", 100, 100, 20);
  run("Properties...", "channels=1 slices=20 frames=1 unit=um pixel_width=0.8
pixel_height=0.8 voxel_depth=0.8");
  Stack.getUnits(x, y, z, t, val);
  print("Units: x=" + x + " y=" + y + " z=" + z + " time=" + t + " value=" +
val);

  saveAs("Tiff", tmp + file_name);
  run("Bio-Formats Importer", "open=" + tmp + file_name +" color_mode=Default
view=Hyperstack stack_order=XYCZT");
// ******************************************************


Here's the stack trace:
(Fiji Is Just) ImageJ 2.0.0-rc-30/1.49u; Java 1.6.0_24 [64-bit]; Windows 7 6.1;
46MB of 98221MB (<1%)

java.lang.NullPointerException
    at loci.plugins.in.Calibrator.applyCalibration(Calibrator.java:71)
    at loci.plugins.in.ImagePlusReader.readImage(ImagePlusReader.java:307)
    at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:238)
    at loci.plugins.in.ImagePlusReader.readImages(ImagePlusReader.java:216)
    at loci.plugins.in.ImagePlusReader.openImagePlus(ImagePlusReader.java:111)
    at loci.plugins.in.Importer.readPixels(Importer.java:146)
    at loci.plugins.in.Importer.run(Importer.java:85)
    at loci.plugins.LociImporter.run(LociImporter.java:78)
    at ij.IJ.runUserPlugIn(IJ.java:199)
    at ij.IJ.runPlugIn(IJ.java:163)
    at ij.Executer.runCommand(Executer.java:132)
    at ij.Executer.run(Executer.java:62)
    at ij.IJ.run(IJ.java:279)
    at ij.macro.Functions.doRun(Functions.java:597)
    at ij.macro.Functions.doFunction(Functions.java:95)
    at ij.macro.Interpreter.doStatement(Interpreter.java:227)
    at ij.macro.Interpreter.doStatements(Interpreter.java:215)
    at ij.macro.Interpreter.run(Interpreter.java:112)
    at ij.macro.Interpreter.run(Interpreter.java:82)
    at ij.macro.Interpreter.run(Interpreter.java:93)
    at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:153)
    at ij.IJ.runMacro(IJ.java:116)
    at ij.IJ.runMacro(IJ.java:105)
    at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:857)
    at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116)
    at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:163)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:175)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at
org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:181)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)

Information about your version of Java:

  os.arch => amd64
  os.name => Windows 7
  os.version => 6.1
  java.version => 1.6.0_24
  java.vendor => Sun Microsystems Inc.
  java.runtime.name => Java(TM) SE Runtime Environment
  java.runtime.version => 1.6.0_24-b07
  java.vm.name => Java HotSpot(TM) 64-Bit Server VM
  java.vm.version => 19.1-b02
  java.vm.vendor => Sun Microsystems Inc.
  java.vm.info => mixed mode
  java.awt.graphicsenv => sun.awt.Win32GraphicsEnvironment
  java.specification.name => Java Platform API Specification
  java.specification.version => 1.6
  sun.cpu.endian => little
  sun.desktop => windows
  file.separator => \

The up-to-date check says: REMIND_LATER

Information relevant to JAVA_HOME related problems:

  JAVA_HOME is set to: C:\UTILIT~1\FIJI-D~1.APP/java/win64/jdk1.6.0_24//jre
  imagej.dir => C:\UTILIT~1\FIJI-D~1.APP

Information about the version of each plugin:

Activated update sites:
ImageJ: <a href="http://update.imagej.net/">http://update.imagej.net/</a> (last check:20150618000647)
Fiji: <a href="http://fiji.sc/update/">http://fiji.sc/update/</a> (last check:20150617220654)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>