public float[] findMinMaxHeights() {
        float[] minmax = new float[2];

        float currentMin, currentMax;
        currentMin = heightData[0][0];
        currentMax = heightData[0][0];

        for (int i = 0; i < imageHeight; i++) {
            for (int j = 0; j < imageWidth; j++) {
                if (heightData[i][j] > currentMax) {
                    currentMax = heightData[i][j];
                } else if (heightData[i][j] < currentMin) {
                    currentMin = heightData[i][j];
                }
            }
        }
        minmax[0] = currentMin;
        minmax[1] = currentMax;
        return minmax;
    }