File: mobius.py

package info (click to toggle)
teem 1.12.0~20160122-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,444 kB
  • sloc: ansic: 152,549; python: 10,748; perl: 281; sh: 58; makefile: 41; cpp: 26
file content (31 lines) | stat: -rw-r--r-- 825 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

import sys
import teem
import pullDemo
import ctypes

npos = teem.nrrdNew()
vol = pullDemo.volLoad(['../../data/fmob-c4h.nrrd:scalar:V'], './', 'ds:1,5', 1)
infoList = ['h-c:V:val:0:-1',
            'hgvec:V:gvec',
            'hhess:V:hess',
            'tan1:V:hevec2',
            'strn:V:heval2:0:-1',
            'lthr:V:heval2:-70:-1',
            'sthr:V:heval2:-70:-1']

pullDemo.run(npos,
             init=[teem.pullInitMethodRandom, 300],
             efs=False,
             vol=vol,
             info=infoList,
             energy={'type':teem.pullInterTypeJustR, 'r':'cwell:0.6,-0.002'},
             iterMax=200,
             radSpace=0.05)

pullDemo.volFree(vol)

if (teem.nrrdSave("npos.nrrd", npos, None)):
    estr = teem.biffGetDone('nrrd')
    print "problem running system:\n%s" % estr
    sys.exit(1)