Login  Register

Re: Voxel depth not saved?

Posted by vischer on Feb 04, 2014; 11:33am
URL: http://imagej.273.s1.nabble.com/Voxel-depth-not-saved-tp5006345p5006395.html

Hi Wayne,


> Voxel depths of zero are not saved. You can work around this problem by using a value near zero, such as 1e-39. File.delete() returns zero because saveAs("Tiff",path) changes the file name from "ABC" to "ABC.tif".
>
> -wayne


thanks for this information. As this behaviour has not changed in the newest version, I assume there is some technical reason for it.

In this context, I noticed that "Set Scale.." silently changes the voxel depth, assuming that voxels are cubic by default (see macro below).
In none of my confocal 3D images voxels were ever cubic, and changing some invisible parameter is not good anyway. My suggestion is not to change the voxel depth automatically.

best regards, Norbert




newImage("ABC.tif", "8-bit white", 400, 400, 2);
run("Properties...", "voxel_depth=0.7");
getVoxelSize(width, height, depth, unit);
print("\\Clear");
print("voxel depth = ", depth);
run("Set Scale...", "distance=8 known=1 unit=um");//also changes voxe
getVoxelSize(width, height, depth, unit);
print("voxel depth = ", depth);

output:
=======
voxel depth =  0.7
voxel depth =  0.125

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