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


Python PythonObjectInputStream.readObject方法代码示例

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


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

示例1: loadPainting3Data

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def loadPainting3Data(imageFile):
    fileName = "/Users/cengelsm/Test/pgsinterp3.p3"
    fis = FileInputStream(fileName)
    ois = PythonObjectInputStream(fis)
    p3 = ois.readObject()
    fis.close()
    image = readImage(imageFile)
    n1, n2, n3 = s1.count, s2.count, s3.count
    d1, d2, d3 = s1.delta, s2.delta, s3.delta
    f1, f2, f3 = s1.first, s2.first, s3.first
    l1, l2, l3 = s1.last, s2.last, s3.last
    ipg = ImagePanelGroup2(s1, s2, s3, image, p3.getPaint())
    ipg.setColorModel1(ColorMap.getGray())
    ipg.setColorModel2(ColorMap.getJet(0.5))
    ipg.setSlices(700, 50, 80)
    sf = SimpleFrame()
    world = sf.getWorld()
    world.addChild(ipg)
    sf.setSize(1250, 900)
    view = sf.getOrbitView()
    zscale = 0.75 * max(n2 * d2, n3 * d3) / (n1 * d1)
    view.setAxesScale(1.0, 1.0, zscale)
    view.setScale(1.3)
    view.setAzimuth(-65.0)
    view.setWorldSphere(BoundingSphere(BoundingBox(f3, f2, f1, l3, l2, l1)))
开发者ID:chrisengelsma,项目名称:csm,代码行数:27,代码来源:display.py

示例2: readTensors

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readTensors():
  tensorsFile = "st"+str(int(sigmaTensor))
  fis = FileInputStream(dataDir+dataPref+tensorsFile+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:Jookai,项目名称:xmw,代码行数:9,代码来源:sos3.py

示例3: readTensors

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readTensors(name):
  """
  Reads tensors from file with specified basename; e.g., "tpet".
  """
  fis = FileInputStream(PATH+name)
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:eliasarias95,项目名称:ea,代码行数:11,代码来源:displayTensors.py

示例4: readTensors

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readTensors(name):
  """
  Reads tensors from file with specified basename; e.g., "f3et".
  """
  fis = FileInputStream(f3dDataSetDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:BKJackson,项目名称:idh,代码行数:11,代码来源:f3utils.py

示例5: loadPaintingSlice

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def loadPaintingSlice(imageFile):
    fileName = "/Users/cengelsm/Test/paintings/pgs_02.p3"
    fis = FileInputStream(fileName)
    ois = PythonObjectInputStream(fis)
    p3 = ois.readObject()
    fis.close()
    image = readImage(imageFile)
    print s1.count, s2.count
    sl = 30
    xz = image[sl]
    pxz = p3.getPaint()[sl]
    panel = PlotPanel(PlotPanel.Orientation.X1DOWN_X2RIGHT)
    pv1 = panel.addPixels(s1, s2, xz)
    pv1.setPercentiles(1, 99)
    pv2 = panel.addPixels(s1, s2, pxz)
    pv2.setColorModel(ColorMap.getJet(0.5))
    panel.setVLabel("Depth (km)")
    panel.setHLabel("Distance (km)")
    frame = PlotFrame(panel)
    frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE)
    frame.setSize(1800, 1000)
    frame.setVisible(True)
    frame.setFontSizeForSlide(1, 1)
    frame.paintToPng(300, 6, "/Users/cengelsm/Desktop/test2.png")
开发者ID:chrisengelsma,项目名称:csm,代码行数:26,代码来源:display.py

示例6: readObject

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readObject(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  obj = ois.readObject()
  ois.close()
  return obj
开发者ID:Jookai,项目名称:xmw,代码行数:8,代码来源:utils.py

示例7: readTensors

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readTensors(tensorsFile):
  fis = FileInputStream(tensorsFile)
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:BKJackson,项目名称:idh,代码行数:8,代码来源:fd3.py

示例8: readTensors

# 需要导入模块: from org.python.util import PythonObjectInputStream [as 别名]
# 或者: from org.python.util.PythonObjectInputStream import readObject [as 别名]
def readTensors(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:chrisengelsma,项目名称:csm,代码行数:8,代码来源:pgsutils.py


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