def load_images(ipl):
    """
    These images are loaded:
    paths_true (paths within single label objects)
    paths_false (paths of merged objects which cross the merging site)
    featureims_true
    featureims_false
    :param ipl:
    :return:
    """
    paths_true = IPL()
    paths_false = IPL()
    featureims_true = IPL()
    featureims_false = IPL()

    params = ipl.get_params()

    ipl.logging('Loading true paths ...')
    # Paths within labels (true paths)
    paths_true.data_from_file(
        filepath=params['intermedfolder'] + params['pathstruefile'],
        skeys='path',
        recursive_search=True, nodata=True
    )

    ipl.logging('Loading false paths ...')
    # Paths of merges (false paths)
    paths_false.data_from_file(
        filepath=params['intermedfolder'] + params['pathsfalsefile'],
        skeys='path',
        recursive_search=True, nodata=True
    )

    ipl.logging('Loading features for true paths ...')
    # Load features for true paths
    featureims_true.data_from_file(
        filepath=params['intermedfolder'] + params['featureimsfile'],
        nodata=True
    )
    featureims_true.delete_items(params['largeobjmnames'][0])

    ipl.logging('Loading features for false paths ...')
    # Load features for false paths
    featureims_false.data_from_file(
        filepath=params['intermedfolder'] + params['featureimsfile'],
        nodata=True
    )
    featureims_false.delete_items(params['largeobjname'])

    return (paths_true, paths_false, featureims_true, featureims_false)
Example #2
0
def load_images(ipl):
    """
    These images are loaded:
    paths_true (paths within single label objects)
    paths_false (paths of merged objects which cross the merging site)
    featureims_true
    featureims_false
    :param ipl:
    :return:
    """
    paths_true = IPL()
    paths_false = IPL()
    featureims_true = IPL()
    featureims_false = IPL()

    params = ipl.get_params()

    ipl.logging('Loading true paths ...')
    # Paths within labels (true paths)
    paths_true.data_from_file(filepath=params['intermedfolder'] +
                              params['pathstruefile'],
                              skeys='path',
                              recursive_search=True,
                              nodata=True)

    ipl.logging('Loading false paths ...')
    # Paths of merges (false paths)
    paths_false.data_from_file(filepath=params['intermedfolder'] +
                               params['pathsfalsefile'],
                               skeys='path',
                               recursive_search=True,
                               nodata=True)

    ipl.logging('Loading features for true paths ...')
    # Load features for true paths
    featureims_true.data_from_file(filepath=params['intermedfolder'] +
                                   params['featureimsfile'],
                                   nodata=True)
    featureims_true.delete_items(params['largeobjmnames'][0])

    ipl.logging('Loading features for false paths ...')
    # Load features for false paths
    featureims_false.data_from_file(filepath=params['intermedfolder'] +
                                    params['featureimsfile'],
                                    nodata=True)
    featureims_false.delete_items(params['largeobjname'])

    return (paths_true, paths_false, featureims_true, featureims_false)