code: public static void printWritableRasterData(Raster raster) {
          RandomIter iter = RandomIterFactory.create(raster, null);
          int cols = raster.getWidth();
          int rows = raster.getHeight();
          for (int r = 0; r < rows; r++) {
              for (int c = 0; c < cols; c++) {
                  printer.print(iter.getSampleDouble(c, r, 0));
                  printer.print(separator);
              }
              printer.println();
          }
          iter.done();
      }
docs: Print data from a {@link Raster}.
  
  @param raster
  the image.