Guest User

Untitled

a guest
Feb 21st, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. class MyGraphicsView(QGraphicsView):
  2.  
  3. def __init__(self, parent = None):
  4. super(MyGraphicsView, self).__init__(parent)
  5.  
  6. self.scene = QGraphicsScene()
  7. qImage = QImage(myPixels.data, numColumns, numRows, QImage.Format_Indexed8)
  8. qImage.setColorTable(self.gray_color_table)
  9. self.sceneImage = self.scene.addPixmap(QPixmap.fromImage(qImage))
  10.  
  11. self.fitInView(roiCoords[0], roiCoords[2], roiCoords[1]-roiCoords[0], roiCoords[3]-roiCoords[2], Qt.KeepAspectRatio)
Add Comment
Please, Sign In to add comment