Exemple #1
0
def getGrayScaleMorphologicalOperation(available_app, original_dom_document):
    """
    Let ball as only available structype.
    Split the application according to its filter dilate, erode, opening, closing.
    """
    the_root = original_dom_document
    renameValueField(the_root, 'structype.ball.xradius', 'name', 'The Structuring Element Radius')
    renameValueField(the_root, 'structype.ball.xradius', 'description', 'The Structuring Element Radius')
    remove_dependent_choices(the_root, 'structype', 'ball')
    remove_other_choices(the_root, 'structype', 'ball')
    remove_parameter_by_key(the_root, 'structype.ball.yradius')

    split = defaultSplit(available_app, the_root, 'filter')
    return split
def getGrayScaleMorphologicalOperation(available_app, original_dom_document):
    """
    Let ball as only available structype.
    Split the application according to its filter dilate, erode, opening, closing.
    """
    the_root = original_dom_document
    renameValueField(the_root, 'structype.ball.xradius', 'name', 'The Structuring Element Radius')
    renameValueField(the_root, 'structype.ball.xradius', 'description', 'The Structuring Element Radius')
    remove_dependant_choices(the_root, 'structype', 'ball')
    remove_other_choices(the_root, 'structype', 'ball')
    remove_parameter_by_key(the_root, 'structype.ball.yradius')

    split = defaultSplit(available_app, the_root, 'filter')
    return split
def getBinaryMorphologicalOperation(available_app, original_dom_document):
    """
    Let ball as only available structype.
    Split the application according to its filter dilate, erode, opening, closing.
    """
    the_root = original_dom_document
    renameValueField(the_root, "structype.ball.xradius", "name", "The Structuring Element Radius")
    renameValueField(the_root, "structype.ball.xradius", "description", "The Structuring Element Radius")
    remove_dependent_choices(the_root, "structype", "ball")
    remove_other_choices(the_root, "structype", "ball")
    remove_dependent_choices(the_root, "filter", "dilate")
    remove_parameter_by_key(the_root, "structype.ball.yradius")
    the_list = defaultSplit(available_app, the_root, "filter")
    return the_list
Exemple #4
0
def getEdgeExtraction(available_app, original_dom_document):
    """
    Let ball as only available filter (not an oval).
    Split the application according to its filter gradient, sobel, touzi.
    """
    the_root = original_dom_document
    renameValueField(the_root, 'filter.touzi.xradius', 'name', 'The Radius')
    renameValueField(the_root, 'filter.touzi.xradius', 'description', 'The Radius')
    remove_parameter_by_key(the_root, 'filter.touzi.yradius')
    split = split_by_choice(the_root, 'filter')
    the_list = []
    for key in split:
        defaultWrite('%s-%s' % (available_app, key), split[key])
        the_list.append(split[key])
    return the_list
def getEdgeExtraction(available_app, original_dom_document):
    """
    Let ball as only available filter (not an oval).
    Split the application according to its filter gradient, sobel, touzi.
    """
    the_root = original_dom_document
    renameValueField(the_root, 'filter.touzi.xradius', 'name', 'The Radius')
    renameValueField(the_root, 'filter.touzi.xradius', 'description', 'The Radius')
    remove_parameter_by_key(the_root, 'filter.touzi.yradius')
    split = split_by_choice(the_root, 'filter')
    the_list = []
    for key in split:
        defaultWrite('%s-%s' % (available_app, key), split[key])
        the_list.append(split[key])
    return the_list