'Return a lookup table from the color gradient defined by this
HistogramLUTItem.'

def getLookupTable(self, img=None, n=None, alpha=None):

    if (n is None):
        if (img.dtype == np.uint8):
            n = 256
        else:
            n = 512
    if (self.lut is None):
        self.lut = self.gradient.getLookupTable(n, alpha=alpha)
    return self.lut
