本文整理汇总了Python中PyMca5.Object3D.Object3DCTools.draw2DGridPoints方法的典型用法代码示例。如果您正苦于以下问题:Python Object3DCTools.draw2DGridPoints方法的具体用法?Python Object3DCTools.draw2DGridPoints怎么用?Python Object3DCTools.draw2DGridPoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PyMca5.Object3D.Object3DCTools
的用法示例。
在下文中一共展示了Object3DCTools.draw2DGridPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _drawMesh
# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import draw2DGridPoints [as 别名]
def _drawMesh(self):
alpha = 1.0 - self._configuration['common']['transparency']
if alpha < 0:
alpha = 0
elif alpha >= 1.0:
alpha = 255
else:
alpha = int(255 * alpha)
self.pixmap[:, 3] = alpha
shape = self._imageData.shape
self._imageData.shape = -1,1
if DRAW_MODES[self._configuration['common']['mode']] == "POINT":
if False:
Object3DCTools.drawXYZPoints(self.vertices,
self.pixmap)
else:
Object3DCTools.draw2DGridPoints(self._xValues,
self._yValues,
self._zValues,
self.pixmap)
elif DRAW_MODES[self._configuration['common']['mode']] == "WIRE":
Object3DCTools.draw2DGridLines(self._xValues,
self._yValues,
self._zValues,
self.pixmap)
elif DRAW_MODES[self._configuration['common']['mode']] == "SURFACE":
Object3DCTools.draw2DGridQuads(self._xValues,
self._yValues,
self._zValues,
self.pixmap)
self._imageData.shape = shape
示例2: buildPointList
# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import draw2DGridPoints [as 别名]
def buildPointList(self, selection=False):
if selection:
if self.vertexSelectionColors is None:
self._getVertexSelectionColors()
if self.__flat:
if self._configuration['private']['colorfilter']:
tinyNumber = 1.0e-10
minValue = self._configuration['common']['colormap'][2] + tinyNumber
maxValue = self._configuration['common']['colormap'][3] - tinyNumber
Object3DCTools.draw3DGridPoints(self._x,
self._y,
self._z,
self.vertexSelectionColors,
self.values,
0,
[1, minValue, maxValue])
else:
Object3DCTools.draw3DGridPoints(self._x,
self._y,
self._z,
self.vertexSelectionColors,
self.values,
0,
self._configuration['private']['useminmax'])
else:
#if self._configuration['private']['colorfilter'] is selected
# I should get the min and max values of the colormap ...
if self._configuration['private']['colorfilter']:
tinyNumber = 1.0e-10
minValue = self._configuration['common']['colormap'][2] + tinyNumber
maxValue = self._configuration['common']['colormap'][3] - tinyNumber
Object3DCTools.draw2DGridPoints(self._x,
self._y,
self._z,
self.vertexSelectionColors,
self.values,
0,
[1, minValue, maxValue])
else:
Object3DCTools.draw2DGridPoints(self._x,
self._y,
self._z,
self.vertexSelectionColors,
self.values,
0,
self._configuration['private']['useminmax'])
else:
if self.__flat:
Object3DCTools.draw3DGridPoints(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])
else:
Object3DCTools.draw2DGridPoints(self._x,
self._y,
self._z,
self.vertexColors,
self.values,
self._configuration['private']['colorfilter'],
self._configuration['private']['useminmax'])