- from os import getenv
- from re import compile
- from sys import argv
- from sys import stderr
- from struct import unpack
- from math import sqrt
- from math import log
- from math import pow
- a = open('output/inputimage-out100-in100x100-p100-34.762.raw')
- b=a.read();
- fields=len(b)/4
- islice=[]
- jslice=[]
- kslice=[]
- for i in xrange(0,100):
- for j in xrange(0,100):
- for k in xrange(0,100):
- value=unpack('f',b[(i*10000+j*100+k)*4:(i*10000+j*100+k+1)*4])
- if i==49:
- islice.append(value[0])
- if j==49:
- jslice.append(value[0])
- if k==49:
- kslice.append(value[0])
- print 'done'
- kfile=file('kslice','w');
- for x in xrange(len(kslice)):
- kfile.write(pack('f', kslice[x]))
Undefined
By: Guest | Date: Apr 27 2010 00:24 | Format: None | Expires: never | Size: 900 B | Hits: 925
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago