Scripts: makesurf.py

File makesurf.py, 584 bytes (added by goddard, 15 years ago)
Line 
1#
2# Example script that creates a surface by stitching marker chains.
3#
4path = "/Users/goddard/test.cmm"
5
6# Read markers from file.
7from chimera import openModels
8openModels.open(path) # Unfortunately this does not return the marker set.
9
10# Create an empty surface.
11from _surface import SurfaceModel
12surf = SurfaceModel()
13openModels.add([surf], baseId = 5) # Make surface have id number 5.
14
15# Calculate surface by stitching marker chains
16from VolumePath import marker_sets, surface
17for mset in marker_sets():
18 surface.make_marker_surface(mset.markers(), surf, caps = True)