def __init__(self): super(MainWindow, self).__init__() # Initialize our nipy image object self.img = ImageData() # Initialize our matplotlib figure self.img_plot = SingleImage(self.figure, self.img.data)