示例#1
0
文件: xia2find.py 项目: xia2/trashcan
def get_sweep(file):

    global known_sweeps

    if not is_image_name(file):
        return

    try:
        template, directory = image2template_directory(file)
        key = (directory, template)
        if not known_sweeps.has_key(key):
            sweeplist = SweepFactory(template, directory)
            known_sweeps[key] = sweeplist

    except exceptions.Exception, e:
        print 'Exception: %s' % str(e)
示例#2
0
def rj_find_matching_images(image):
    template, directory = image2template_directory(image)
    images = find_matching_images(template, directory)
    return images
示例#3
0
def rj_get_template_directory(image):
    template, directory = image2template_directory(image)    
    return template, directory