def __init__(self, sandbox, component, title='Untitled'):
pg.PlotItem.__init__(self)
self.title = title
self.sandbox = sandbox
self.component = component
self.cursor = CursorRect()
self.addCursor()
self.setAspectLocked(True)
self.setLabels(
bottom=('Easting', 'm'),
left=('Northing', 'm'))
self.image = pg.ImageItem(
None,
autoDownsample=False,
useOpenGL=True)
self.addItem(self.image)
self.title_label = pg.LabelItem(
text='<span style="color: #9E9E9E;">'
'%s</span>' % self.title,
justify='right', size='10pt',
parent=self)
self.title_label.anchor(
itemPos=(0., 0.),
parentPos=(.01, .01))
self.title_label.setOpacity(.6)
self.sandbox.sigModelUpdated.connect(
self.update)
self.sandbox.sources.modelAboutToBeReset.connect(
self.removeSourceROIS)
self.sandbox.sources.modelReset.connect(
self.addSourceROIS)
self.update()
self.rois = []
self.addSourceROIS()
评论列表
文章目录