I am trying to do some image analysis using ImageJ libraries in a Java application. I have TIF files with Z stack and 3 channels. To do some analysis/quantification I wanted to use getVoxel method, to access a voxel with the given x, y and z coordinates. This works… However, my images have 3 channels… I wanted to separate them in 3 Hyperstacks.
For this, I used
ImagePlus ijNuclei = SubHyperstackMaker.makeSubhyperstack(ij, "1", "1-" + dimensions, "1");
I can also display with
ijNuclei.show() and everything is fine. But after makeSubhyperstack subHyperstack returns always 0 (for every voxel), which is not correct. I can access same with
ij.getImageStack().getVoxel(x, y, z) and it returns intensity. I can continue with this, but z also includes different channels (rgbrgbrgb…) and that is the reason for generating a substack in the first place. It also looks fine in the window.
Is my approach false? I need a fast and easy way to access voxels with x, y, z coordinates.