code: public static void rotateCW( InterleavedS64 input , InterleavedS64 output ) {
  		if( input.width != output.height || input.height != output.width || input.numBands != output.numBands )
  			throw new IllegalArgumentException("Incompatible shapes");
  
  		int h = input.height-1;
  
  		for( int y = 0; y < input.height; y++ ) {
  			int indexSrc = input.startIndex + y*input.stride;
  			for (int x = 0; x < input.width; x++) {
  				int indexDst = output.getIndex(h-y,x);
  
  				int end = indexSrc + input.numBands;
  				while( indexSrc != end ) {
  					output.data[indexDst++] = input.data[indexSrc++];
  				}
  			}
  		}
  	}
docs: Rotates the image 90 degrees in the clockwise direction.