def run(): asm = PASM([0, 1], 1000) allLines = [] pts = [] for f in files: with open(os.path.join(OUTPUT, f), "r") as infile: allLines = infile.readlines() if len(allLines) > 0: cleanLines = [x.strip().split('\t') for x in allLines] ptList = [Point(x[0], x[1]) for x in cleanLines] print len(ptList) asm.addShape(Shape(ptList)) asm.iterateAlignment()
def run(): asm = PASM([0,1], 1000 ) allLines = [] pts = [] for f in files: with open( os.path.join( OUTPUT, f), "r" ) as infile: allLines = infile.readlines() if len(allLines) > 0: cleanLines = [ x.strip().split('\t') for x in allLines] ptList = [ Point( x[0], x[1]) for x in cleanLines ] print len( ptList ) asm.addShape( Shape( ptList ) ) asm.iterateAlignment()
def setup( ): s1 = Shape( [ Point(200,340), Point( 0, 200), Point( 350,200) ] ) s2 = Shape( [ Point(210,320), Point( 5, 205), Point( 340,190) ] ) s3 = Shape( [ Point(205,300), Point( 10, 190), Point( 344,204) ] ) s4 = Shape( [ Point(199,380), Point( -5, 205), Point( 333,203) ] ) s5 = Shape( [ Point(190,290), Point( 0, 190), Point( 351,201) ] ) asm = PASM( [0,1], 10 ) asm.addShape( s1 ) asm.addShape( s2 ) asm.addShape( s3 ) asm.addShape( s4 ) asm.addShape( s5 ) return asm