private void checkForRotation(){
        double tangent = (this.highYaxisXpixel - this.lowYaxisXpixel)/(this.highYaxisYpixel - this.lowYaxisYpixel);
        this.angleYaxis = Math.toDegrees(Math.atan(tangent));
        tangent = (this.lowXaxisYpixel - this.highXaxisYpixel)/(this.highXaxisXpixel - this.lowXaxisXpixel);
        this.angleXaxis = Math.toDegrees(Math.atan(tangent));
        this.angleMean = (this.angleXaxis + this.angleYaxis)/2.0;
        double absMean = Math.abs(this.angleMean);
        if(absMean!=0.0 && absMean>this.angleTolerance)performRotation();
    }