当前位置: 首页>>代码示例>>Python>>正文


Python Object3DCTools.draw3DGridPoints方法代码示例

本文整理汇总了Python中PyMca5.Object3D.Object3DCTools.draw3DGridPoints方法的典型用法代码示例。如果您正苦于以下问题:Python Object3DCTools.draw3DGridPoints方法的具体用法?Python Object3DCTools.draw3DGridPoints怎么用?Python Object3DCTools.draw3DGridPoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyMca5.Object3D.Object3DCTools的用法示例。


在下文中一共展示了Object3DCTools.draw3DGridPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: buildPointList0

# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import draw3DGridPoints [as 别名]
 def buildPointList0(self):
     """
     This is just to test memory and speed
     """
     n1, n2, n3 = 256, 256, 256
     zdata = numpy.arange(n1*n2*n3).astype(numpy.float32)
     zdata.shape= -1, 1
     (image,size,minmax)= spslut.transform(zdata,
                                       (1,0),
                                       (spslut.LINEAR,3.0),
                                       "RGBX",
                                       spslut.TEMP,
                                       1,
                                       (0, 1),
                                       (0, 255),1)
     image.shape = -1, 4
     image[:,3] = 255
     #self.vertexColors = image.astype(numpy.float32)
     x = numpy.arange(n1).astype(numpy.float32)
     y = numpy.arange(n2).astype(numpy.float32)
     z = numpy.arange(n3).astype(numpy.float32)
     #Object3DCTools.draw3DGridQuads(x, y, y)
     #Object3DCTools.draw3DGridLines(x, y, z, image)
     Object3DCTools.draw3DGridPoints(x, y, z, image)
     self.zdata = zdata
开发者ID:PiRK,项目名称:pymca,代码行数:27,代码来源:Object3DMesh.py

示例2: buildPointList

# 需要导入模块: from PyMca5.Object3D import Object3DCTools [as 别名]
# 或者: from PyMca5.Object3D.Object3DCTools import draw3DGridPoints [as 别名]
 def buildPointList(self, selection=False):
     if selection:
         if self.vertexSelectionColors is None:
             self._getVertexSelectionColors()
         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:
         Object3DCTools.draw3DGridPoints(self._x,
                                    self._y,
                                    self._z,
                                    self.vertexColors,
                                    self.values,
                                    self._configuration['private']['colorfilter'],
                                    self._configuration['private']['useminmax'])
开发者ID:isaxs,项目名称:pymca,代码行数:33,代码来源:Object3DStack.py


注:本文中的PyMca5.Object3D.Object3DCTools.draw3DGridPoints方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。