'Closes the widget nicely, making sure to clear the graphics scene and release memory.'

def close(self):

    self.ui.roiPlot.close()
    self.ui.graphicsView.close()
    self.scene.clear()
    del self.image
    del self.imageDisp
    super(ImageView, self).close()
    self.setParent(None)
