When I run
IJ.saveAs ('image_name_without_path') my
images get saved (as far as I can tell) to $HOME (running ubuntu).
When I run
normally it tries to open the image from $HOME. But if it’s a TIFF
image, it tried to open it from root ("/").
Here is a test script:
from ij import IJ imp1a = IJ.createImage ('image1', '8-bit ramp', 256, 256, 1) IJ.saveAs (imp1a, 'PNG', 'image1.png') # saves to $HOME imp1b = IJ.openImage ('image1.png') # works -- opens from $HOME imp1b.show() # works imp2a = IJ.createImage ('image2', '8-bit ramp', 256, 256, 1) IJ.saveAs (imp2a, 'TIFF', 'image2.tif') # saves to $HOME imp2b = IJ.openImage ('image2.tif') # fails -- tries to open from root ("/") imp2b.show() # fails with "AttributeError: 'NoneType' object has no attribute 'show'" # but works if I copy image2.tif to / (root)
When I run the script, the second open fails with the following
“/image2.tif (No such file or directory)”
If I copy the missing file from $HOME to root, then the script runs.
(I get the same results with both the most recent auto-update, 1.52p,
and the most recent daily build, 1.52r33.)