Hi José,
> I have not found a way to get or set the voxel size using the methods
> from ImagePlus or ImageStack.
It's part of the Calibration class:
ImagePlus imp = ...;
double xVox = imp.getCalibration().pixelWidth;
double yVox = imp.getCalibration().pixelHeight;
double zVox = imp.getCalibration().pixelDepth;
Regards,
Curtis
On Fri, Oct 5, 2012 at 4:59 AM, José María Mateos <
[hidden email]>wrote:
> Hi everybody,
>
> I have a 3D image with a certain voxel size. I have a plugin that does
> some processing and returns a new image with the same dimensions as the
> original one. However, the voxel size for the new image is 1x1x1, which may
> lead to problems. I have not found a way to get or set the voxel size using
> the methods from ImagePlus or ImageStack. I tried get and setFileInfo() but
> it's not what I'm looking for.
>
> Currently I am using a macro and the functions getVoxelSize(...) and
> setVoxelSize(...) to copy that information from the original image to the
> resulting image. This works, but is a workaround I'd like to avoid. Is
> there any "pure" API call that I can use for this?
>
> Best,
>
> José María Mateos.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.**html<
http://imagej.nih.gov/ij/list.html>
>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html