'If *image* (ImageItem) is provided, then the control will be automatically linked to the image and changes to the control will be immediately reflected in the image\'s appearance.
By default, the histogram is rendered with a fill. For performance, set *fillHistogram* = False.'

def __init__(self, image=None, fillHistogram=True):

    GraphicsWidget.__init__(self)
    self.lut = None
    self.imageItem = (lambda : None)
    self.layout = QtGui.QGraphicsGridLayout()
    self.setLayout(self.layout)
    self.layout.setContentsMargins(1, 1, 1, 1)
    self.layout.setSpacing(0)
    self.vb = ViewBox(parent=self)
    self.vb.setMaximumWidth(152)
    self.vb.setMinimumWidth(45)
    self.vb.setMouseEnabled(x=False, y=True)
    self.gradient = GradientEditorItem()
    self.gradient.setOrientation('right')
    self.gradient.loadPreset('grey')
    self.region = LinearRegionItem([0, 1], LinearRegionItem.Horizontal)
    self.region.setZValue(1000)
    self.vb.addItem(self.region)
    self.axis = AxisItem('left', linkView=self.vb, maxTickLength=(-10), parent=self)
    self.layout.addItem(self.axis, 0, 0)
    self.layout.addItem(self.vb, 0, 1)
    self.layout.addItem(self.gradient, 0, 2)
    self.range = None
    self.gradient.setFlag(self.gradient.ItemStacksBehindParent)
    self.vb.setFlag(self.gradient.ItemStacksBehindParent)
    self.gradient.sigGradientChanged.connect(self.gradientChanged)
    self.region.sigRegionChanged.connect(self.regionChanging)
    self.region.sigRegionChangeFinished.connect(self.regionChanged)
    self.vb.sigRangeChanged.connect(self.viewRangeChanged)
    self.plot = PlotDataItem()
    self.plot.rotate(90)
    self.fillHistogram(fillHistogram)
    self.vb.addItem(self.plot)
    self.autoHistogramRange()
    if (image is not None):
        self.setImageItem(image)
