comparison seg2matrix/CGData/SegToMatrix.py @ 35:8ef79bd0be9a

modify
author jingchunzhu <jingchunzhu@gmail.com>
date Fri, 24 Jul 2015 16:14:36 -0700
parents ab20c0d04f4a
children 59dbe857f5d4
comparison
equal deleted inserted replaced
34:d8e98030eca9 35:8ef79bd0be9a
1
2
3 import ctypes 1 import ctypes
4 import os 2 import os
5 3
6 base = os.path.dirname(os.path.abspath(__file__)) 4 base = os.path.dirname(os.path.abspath(__file__))
7 libFile = base + "/CsegToMatrix.so" 5 libFile = base + "/CsegToMatrix.so"
6
7 os.system("rm -f "+ base+"/CsegToMatrix.so")
8 os.system("g++ -fPIC --shared "+ base +"/CsegToMatrix.cc -o "+ base +"/CsegToMatrix.so")
9
8 if os.path.exists(libFile): 10 if os.path.exists(libFile):
9 segLib = ctypes.cdll.LoadLibrary(libFile) 11 segLib = ctypes.cdll.LoadLibrary(libFile)
10 12
11 13
12 def seg_to_matrix(seg_handle, out_handle): 14 def seg_to_matrix(seg_handle, out_handle):