'Estimate the min/max values of the image data by subsampling.'

def quickMinMax(self, targetSize=1000000.0):

    data = self.image
    while (data.size > targetSize):
        ax = np.argmax(data.shape)
        sl = ([slice(None)] * data.ndim)
        sl[ax] = slice(None, None, 2)
        data = data[sl]
    return (nanmin(data), nanmax(data))
