I have a tif image and I want to get the rgb values in a 2d array.

With ImageIO and a jpg picture I can use sth. like this:
Java Code:
int w = _bufferedImage.getWidth();
int h = _bufferedImage.getHeight();
int[] rgbs = new int[w*h];
_bufferedImage.getRGB(0, 0, w, h, rgbs, 0, w);
for (int i = 0; i < rgbs.length; i++) {
  Color c = new Color(rgbs[i]);
  //c.getRed() - c.getGreen() - c.getBlue()
How could I do this with JAI? I have
Java Code:
PlanarImage myImage = JAI.create("fileload", myFilename);
to read the image. But how could I access the pixels and the color?

Thanks for your help & Best Regards.