|
I am trying to get the pixel values of an image, I put in the line
byte[] pixels = (byte[])ip.getPixels();
in the following code but it does not work.
can anyone help?
void macro1(ImagePlus imp, ImageProcessor ip) {
int volumeCount = ip.getWidth();
byte[] pixels = (byte[])ip.getPixels();
IJ.write("the width of this image is: " + volumeCount );
}
|