'By default, this class creates an :class:`ImageItem <pyqtgraph.ImageItem>` to display image data
and a :class:`ViewBox <pyqtgraph.ViewBox>` to contain the ImageItem.
**Arguments**
parent        (QWidget) Specifies the parent widget to which
this ImageView will belong. If None, then the ImageView
is created with no parent.
name          (str) The name used to register both the internal ViewBox
and the PlotItem used to display ROI data. See the *name*
argument to :func:`ViewBox.__init__()
<pyqtgraph.ViewBox.__init__>`.
view          (ViewBox or PlotItem) If specified, this will be used
as the display area that contains the displayed image.
Any :class:`ViewBox <pyqtgraph.ViewBox>`,
:class:`PlotItem <pyqtgraph.PlotItem>`, or other
compatible object is acceptable.
imageItem     (ImageItem) If specified, this object will be used to
display the image. Must be an instance of ImageItem
or other compatible object.
Note: to display axis ticks inside the ImageView, instantiate it
with a PlotItem instance as its view::
pg.ImageView(view=pg.PlotItem())'

def __init__(self, parent=None, name='ImageView', view=None, imageItem=None, *args):

    QtGui.QWidget.__init__(self, parent, *args)
    self.levelMax = 4096
    self.levelMin = 0
    self.name = name
    self.image = None
    self.axes = {}
    self.imageDisp = None
    self.ui = Ui_Form()
    self.ui.setupUi(self)
    self.scene = self.ui.graphicsView.scene()
    self.ignoreTimeLine = False
    if (view is None):
        self.view = ViewBox()
    else:
        self.view = view
    self.ui.graphicsView.setCentralItem(self.view)
    self.view.setAspectLocked(True)
    self.view.invertY()
    if (imageItem is None):
        self.imageItem = ImageItem()
    else:
        self.imageItem = imageItem
    self.view.addItem(self.imageItem)
    self.currentIndex = 0
    self.ui.histogram.setImageItem(self.imageItem)
    self.menu = None
    self.ui.normGroup.hide()
    self.roi = PlotROI(10)
    self.roi.setZValue(20)
    self.view.addItem(self.roi)
    self.roi.hide()
    self.normRoi = PlotROI(10)
    self.normRoi.setPen('y')
    self.normRoi.setZValue(20)
    self.view.addItem(self.normRoi)
    self.normRoi.hide()
    self.roiCurve = self.ui.roiPlot.plot()
    self.timeLine = InfiniteLine(0, movable=True)
    self.timeLine.setPen((255, 255, 0, 200))
    self.timeLine.setZValue(1)
    self.ui.roiPlot.addItem(self.timeLine)
    self.ui.splitter.setSizes([(self.height() - 35), 35])
    self.ui.roiPlot.hideAxis('left')
    self.keysPressed = {}
    self.playTimer = QtCore.QTimer()
    self.playRate = 0
    self.lastPlayTime = 0
    self.normRgn = LinearRegionItem()
    self.normRgn.setZValue(0)
    self.ui.roiPlot.addItem(self.normRgn)
    self.normRgn.hide()
    for fn in ['addItem', 'removeItem']:
        setattr(self, fn, getattr(self.view, fn))
    for fn in ['setHistogramRange', 'autoHistogramRange', 'getLookupTable', 'getLevels']:
        setattr(self, fn, getattr(self.ui.histogram, fn))
    self.timeLine.sigPositionChanged.connect(self.timeLineChanged)
    self.ui.roiBtn.clicked.connect(self.roiClicked)
    self.roi.sigRegionChanged.connect(self.roiChanged)
    self.ui.menuBtn.clicked.connect(self.menuClicked)
    self.ui.normDivideRadio.clicked.connect(self.normRadioChanged)
    self.ui.normSubtractRadio.clicked.connect(self.normRadioChanged)
    self.ui.normOffRadio.clicked.connect(self.normRadioChanged)
    self.ui.normROICheck.clicked.connect(self.updateNorm)
    self.ui.normFrameCheck.clicked.connect(self.updateNorm)
    self.ui.normTimeRangeCheck.clicked.connect(self.updateNorm)
    self.playTimer.timeout.connect(self.timeout)
    self.normProxy = SignalProxy(self.normRgn.sigRegionChanged, slot=self.updateNorm)
    self.normRoi.sigRegionChangeFinished.connect(self.updateNorm)
    self.ui.roiPlot.registerPlot((self.name + '_ROI'))
    self.view.register(self.name)
    self.noRepeatKeys = [QtCore.Qt.Key_Right, QtCore.Qt.Key_Left, QtCore.Qt.Key_Up, QtCore.Qt.Key_Down, QtCore.Qt.Key_PageUp, QtCore.Qt.Key_PageDown]
    self.roiClicked()
