planeStats.sumOfSquares = pixelValue*pixelValue;
planeStats.sumOfSquares += pixelValue*pixelValue;
    public void update(double pixelValue, int z, int w, int t)    {        Integer index = linearize(z, w, t);        ROIPlaneStats planeStats = (ROIPlaneStats) arrayMap.get(index);        //planeStats can't be null, see onStartPlane().        if (pixelValue < planeStats.min) planeStats.min = pixelValue;        if (planeStats.max < pixelValue) planeStats.max = pixelValue;        planeStats.sum += pixelValue;        planeStats.sumOfSquares = pixelValue*pixelValue;    }