本文整理汇总了Python中silx.gui.plot.PlotWidget.getGraphTitle方法的典型用法代码示例。如果您正苦于以下问题:Python PlotWidget.getGraphTitle方法的具体用法?Python PlotWidget.getGraphTitle怎么用?Python PlotWidget.getGraphTitle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类silx.gui.plot.PlotWidget
的用法示例。
在下文中一共展示了PlotWidget.getGraphTitle方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SilxMaskImageWidget
# 需要导入模块: from silx.gui.plot import PlotWidget [as 别名]
# 或者: from silx.gui.plot.PlotWidget import getGraphTitle [as 别名]
#.........这里部分代码省略.........
:return: Image as a 2D array
"""
index = self.slider.value()
image = self._images[index]
return self._RgbaToGrayscale(image)
def getFirstBgImageData(self):
"""Return first bg image data to be sent to RGB correlator
:return: Image as a 2D array
"""
image = self._bg_images[0]
return self._RgbaToGrayscale(image)
def getBgImagesDict(self):
"""Return a dict containing the data for all background images."""
bgimages = {}
for i, label in enumerate(self._bg_labels):
data = self._bg_images[i]
origin = self._bg_origins[i]
delta_w, delta_h = self._bg_deltaXY[i]
w, h = delta_w * data.shape[1], delta_h * data.shape[0]
bgimages[label] = {"data": data,
"origin": origin,
"width": w,
"height": h}
return bgimages
def _addImageClicked(self):
imageData = self.getImageData()
ddict = {
'event': "addImageClicked",
'image': imageData,
'title': self.plot.getGraphTitle(),
'id': id(self)}
self.sigMaskImageWidget.emit(ddict)
def _replaceImageClicked(self):
imageData = self.getImageData()
ddict = {
'event': "replaceImageClicked",
'image': imageData,
'title': self.plot.getGraphTitle(),
'id': id(self)}
self.sigMaskImageWidget.emit(ddict)
def _removeImageClicked(self):
imageData = self.getImageData()
ddict = {
'event': "removeImageClicked",
'image': imageData,
'title': self.plot.getGraphTitle(),
'id': id(self)}
self.sigMaskImageWidget.emit(ddict)
def showImage(self, index=0):
"""Show data image corresponding to index. Update slider to index.
"""
if not self._images:
return
assert index < len(self._images)
bg_index = None
if self.backgroundButton.isChecked():
for i, imageName in enumerate(self._labels):
if imageName.lower().endswith('background'):