Hi John,
ImageJ stores planes of data in an ImageStack. As far as I can tell there
are no 1D access methods.
If you look at the ImageStack class you can see it has a
setVoxel(x,y,z,val) method and a getVoxel(x,y,z) method. This isn't exactly
what you need but might be helpful for your port.
Alternatively you could easily write your own 1D accessor methods that take
an ImageStack and given a 1D index set/get the associated value. How to do
so should be apparent when looking at ImageStack:getVoxel().
On Sun, Apr 14, 2013 at 8:48 PM, John <
[hidden email]> wrote:
> I would like to port a few 3D C/C++ codes to plugins. The C codes treat 3D
> images as 1D arrays and access pixels using x + y*width + z*width*height.
> Is there a method to access a stack as a 1D array?
>
> Thanks,
>
> John Dunsmuir
>
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html