Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyGraphicsView(QGraphicsView):
- def __init__(self, parent = None):
- super(MyGraphicsView, self).__init__(parent)
- self.scene = QGraphicsScene()
- qImage = QImage(myPixels.data, numColumns, numRows, QImage.Format_Indexed8)
- qImage.setColorTable(self.gray_color_table)
- self.sceneImage = self.scene.addPixmap(QPixmap.fromImage(qImage))
- self.fitInView(roiCoords[0], roiCoords[2], roiCoords[1]-roiCoords[0], roiCoords[3]-roiCoords[2], Qt.KeepAspectRatio)
Add Comment
Please, Sign In to add comment