當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。