@Override public String toString() { String out = getClass().getSimpleName()+" : w="+width+", h="+height+", c="+numBands+"\n"; for (int y = 0; y < height; y++) { int index = startIndex + y*stride; for (int x = 0; x < width; x++) { for (int band = 0; band < numBands; band++) { out += toString_element(index++)+" "; } if( x < width-1) out += ", "; } out += "\n"; } return out; }