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


Python util.PythonObjectInputStream类代码示例

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


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

示例1: loadPainting3Data

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,代码行数:25,代码来源:display.py

示例2: readTensors

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,代码行数:7,代码来源:sos3.py

示例3: readTensors

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,代码行数:9,代码来源:displayTensors.py

示例4: readTensors

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,代码行数:9,代码来源:f3utils.py

示例5: loadPaintingSlice

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,代码行数:24,代码来源:display.py

示例6: readObject

def readObject(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  obj = ois.readObject()
  ois.close()
  return obj
开发者ID:Jookai,项目名称:xmw,代码行数:6,代码来源:utils.py

示例7: readTensors

def readTensors(tensorsFile):
  fis = FileInputStream(tensorsFile)
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:BKJackson,项目名称:idh,代码行数:6,代码来源:fd3.py

示例8: readTensors

def readTensors(name):
  fis = FileInputStream(seismicDir+name+".dat")
  ois = PythonObjectInputStream(fis)
  tensors = ois.readObject()
  fis.close()
  return tensors
开发者ID:chrisengelsma,项目名称:csm,代码行数:6,代码来源:pgsutils.py


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