本文整理汇总了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)))
示例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
示例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
示例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
示例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")
示例6: readObject
def readObject(name):
fis = FileInputStream(seismicDir+name+".dat")
ois = PythonObjectInputStream(fis)
obj = ois.readObject()
ois.close()
return obj
示例7: readTensors
def readTensors(tensorsFile):
fis = FileInputStream(tensorsFile)
ois = PythonObjectInputStream(fis)
tensors = ois.readObject()
fis.close()
return tensors
示例8: readTensors
def readTensors(name):
fis = FileInputStream(seismicDir+name+".dat")
ois = PythonObjectInputStream(fis)
tensors = ois.readObject()
fis.close()
return tensors