Esempio n. 1
0
File: set1.py Progetto: tmplab/LJay
def MappingConf(section):
    global mouse_prev, sections, warpd

    gstt.CurrentWindow = -1
    gstt.CurrentCorner = 0
    gstt.CurrentSection = section
    mouse_prev = ((405, 325), (0, 0, 0))

    # Get all windows points (="corners") for the given section of the conf file -> gstt.Windows
    gstt.Windows = []
    sections = settings.MappingSections()

    gstt.Laser = settings.MappingRead([sections[gstt.CurrentSection], 'laser'])
    print "Laser : ", gstt.Laser
    gstt.simuPL = gstt.Laser

    print ""
    print "Reading Section : ", sections[gstt.CurrentSection]

    for Window in xrange(settings.Mapping(sections[gstt.CurrentSection]) - 1):

        print "Reading option :  ", str(Window)
        shape = [sections[gstt.CurrentSection], str(Window)]
        WindowPoints = settings.MappingRead(shape)
        gstt.Windows.append(WindowPoints)

    print "Section points : ", gstt.Windows

    #print "gstt.warpdest ", type(gstt.warpdest[gstt.Laser]), " ", gstt.warpdest[gstt.Laser]
    warpd = ast.literal_eval(gstt.warpdest[gstt.Laser])
    print "warpd", warpd
Esempio n. 2
0
File: set0.py Progetto: tmplab/LJay
def MappingConf(section):
    global mouse_prev, sections, warpd

    gstt.EditStep = 0
    gstt.CurrentWindow = -1
    gstt.CurrentCorner = 0
    gstt.CurrentSection = section
    mouse_prev = ((405, 325), (0, 0, 0))

    # Get all shapes points (="corners") for the given section of the conf file -> gstt.Windows
    gstt.Windows = []
    sections = settings.MappingSections()

    print ""
    #print "Sections : ", sections
    print "Reading Section : ", sections[gstt.CurrentSection]

    gstt.Laser = settings.MappingRead([sections[gstt.CurrentSection], 'laser'])
    print "Laser : ", gstt.Laser
    gstt.simuPL = gstt.Laser
    warpd = np.array(gstt.warpdest[gstt.Laser])

    for Window in xrange(settings.Mapping(sections[gstt.CurrentSection]) - 1):
        if gstt.debug > 0:
            print "Reading option :  ", str(Window)
        shape = [sections[gstt.CurrentSection], str(Window)]
        WindowPoints = settings.MappingRead(shape)
        gstt.Windows.append(WindowPoints)

    print "Section points : ", gstt.Windows