Beispiel #1
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('restoration', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_unwrap_1d.pyx'], working_path=base_path)
    cython(['_unwrap_2d.pyx'], working_path=base_path)
    cython(['_unwrap_3d.pyx'], working_path=base_path)
    cython(['_denoise_cy.pyx'], working_path=base_path)
    cython(['_nl_means_denoising.pyx'], working_path=base_path)

    config.add_extension('_unwrap_1d', sources=['_unwrap_1d.c'],
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_2d = ['_unwrap_2d.c', 'unwrap_2d_ljmu.c']
    config.add_extension('_unwrap_2d', sources=unwrap_sources_2d,
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_3d = ['_unwrap_3d.c', 'unwrap_3d_ljmu.c']
    config.add_extension('_unwrap_3d', sources=unwrap_sources_3d,
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_denoise_cy', sources=['_denoise_cy.c'],
        include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_nl_means_denoising',
                         sources=['_nl_means_denoising.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #2
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from skimage._build import cython

    config = Configuration('zmuv', parent_package, top_path)

    cython(['zmuv.pyx'], working_path=base_path)

    config.add_extension(
        'zmuv',
        sources=['zmuv.c'],
        include_dirs=[get_numpy_include_dirs()],
        extra_compile_args=[
            "-fopenmp",
            "-pthread",
            "-O3",
            #"-march=native",
            #"-mtune=native",
            #"-funroll-all-loops",
            #"-fomit-frame-pointer",
            #"-msse4",
            #"-ftree-vectorize",
            #"-ftree-vectorizer-verbose=5",
            #"-ffast-math",
            #"-ftree-loop-distribution",
            #"-funroll-loops",
            #"-ftracer",
            #"-ftree-parallelize-loops=4",
            #"-foptimize-register-move",
            #"-funswitch-loops",
        ],
        extra_link_args=['-fopenmp'],
        )

    return config
Beispiel #3
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('measure', parent_package, top_path)
    config.add_data_dir('tests')

    cython([
        '_ccomp.pyx', '_find_contours_cy.pyx', '_moments_cy.pyx',
        '_marching_cubes_classic_cy.pyx', '_marching_cubes_lewiner_cy.pyx',
        '_pnpoly.pyx'
    ],
           working_path=base_path)

    config.add_extension('_ccomp',
                         sources=['_ccomp.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_contours_cy',
                         sources=['_find_contours_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_moments_cy',
                         sources=['_moments_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_marching_cubes_classic_cy',
                         sources=['_marching_cubes_classic_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_marching_cubes_lewiner_cy',
                         sources=['_marching_cubes_lewiner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_pnpoly',
                         sources=['_pnpoly.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #4
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('filters', parent_package, top_path)

    cython([
        'rank/core_cy.pyx', 'rank/generic_cy.pyx', 'rank/percentile_cy.pyx',
        'rank/bilateral_cy.pyx', '_multiotsu.pyx'
    ],
           working_path=base_path)

    config.add_extension('rank.core_cy',
                         sources=['rank/core_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_multiotsu',
                         sources=['_multiotsu.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.generic_cy',
                         sources=['rank/generic_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.percentile_cy',
                         sources=['rank/percentile_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.bilateral_cy',
                         sources=['rank/bilateral_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #5
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('filter', parent_package, top_path)
    config.add_data_dir('tests')
    config.add_data_dir('rank/tests')

    cython(['_ctmf.pyx'], working_path=base_path)
    cython(['rank/core_cy.pyx'], working_path=base_path)
    cython(['rank/generic_cy.pyx'], working_path=base_path)
    cython(['rank/percentile_cy.pyx'], working_path=base_path)
    cython(['rank/bilateral_cy.pyx'], working_path=base_path)

    config.add_extension('_ctmf', sources=['_ctmf.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.core_cy', sources=['rank/core_cy.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.generic_cy', sources=['rank/generic_cy.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank.percentile_cy', sources=['rank/percentile_cy.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank.bilateral_cy', sources=['rank/bilateral_cy.c'],
        include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #6
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('transform', parent_package, top_path)
    config.add_data_dir('tests')

    cython([
        '_hough_transform.pyx', '_warps_cy.pyx', '_radon_transform.pyx',
        '_seam_carving.pyx'
    ],
           working_path=base_path)

    config.add_extension('_hough_transform',
                         sources=['_hough_transform.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_warps_cy',
                         sources=['_warps_cy.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    config.add_extension('_radon_transform',
                         sources=['_radon_transform.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_seam_carving',
                         sources=['_seam_carving.c'],
                         include_dirs=[get_numpy_include_dirs()])
    return config
Beispiel #7
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('restoration', parent_package, top_path)

    cython([
        '_unwrap_1d.pyx', '_unwrap_2d.pyx', '_unwrap_3d.pyx',
        '_denoise_cy.pyx', '_nl_means_denoising.pyx'
    ],
           working_path=base_path)
    cython(['_rolling_ball_cy.pyx'], working_path=base_path)

    config.add_extension('_unwrap_1d',
                         sources=['_unwrap_1d.c'],
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_2d = ['_unwrap_2d.c', 'unwrap_2d_ljmu.c']
    config.add_extension('_unwrap_2d',
                         sources=unwrap_sources_2d,
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_3d = ['_unwrap_3d.c', 'unwrap_3d_ljmu.c']
    config.add_extension('_unwrap_3d',
                         sources=unwrap_sources_3d,
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_denoise_cy',
                         sources=['_denoise_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_nl_means_denoising',
                         sources=['_nl_means_denoising.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_rolling_ball_cy',
                         sources=['_rolling_ball_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #8
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_files('orb_descriptor_positions.txt')

    cython([
        'corner_cy.pyx',
        'censure_cy.pyx',
        'orb_cy.pyx',
        '_texture.pyx',
        '_hoghistogram.pyx',
        '_sift.pyx',
    ],
           working_path=base_path)
    # _haar uses c++, so it must be cythonized separately
    cython(['_cascade.pyx', '_haar.pyx'], working_path=base_path)

    config.add_extension('_cascade',
                         sources=['_cascade.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language="c++")
    config.add_extension('corner_cy',
                         sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy',
                         sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('orb_cy',
                         sources=['orb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture',
                         sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_hoghistogram',
                         sources=['_hoghistogram.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_haar',
                         sources=['_haar.cpp'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'],
                         language="c++")
    config.add_extension('_sift',
                         sources=['_sift.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    # pythran submodules
    pythran.config.logger.setLevel(logging.INFO)
    ext = pythran.dist.PythranExtension(
        'skimage.feature.brief_cy',
        sources=["skimage/feature/brief_pythran.py"],
        config=['compiler.blas=none'])
    config.ext_modules.append(ext)

    ext = pythran.dist.PythranExtension(
        'skimage.feature._hessian_det_appx',
        sources=["skimage/feature/_hessian_det_appx_pythran.py"],
        config=['compiler.blas=none'])
    config.ext_modules.append(ext)

    return config
Beispiel #9
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('segmentation', parent_package, top_path)

    cython([
        '_watershed_cy.pyx',
        '_felzenszwalb_cy.pyx',
        '_quickshift_cy.pyx',
        '_slic.pyx',
    ],
           working_path=base_path)
    config.add_extension('_watershed_cy',
                         sources=['_watershed_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_felzenszwalb_cy',
                         sources=['_felzenszwalb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_quickshift_cy',
                         sources=['_quickshift_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_slic',
                         sources=['_slic.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #10
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from skimage._build import cython

    config = Configuration('resample', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_resample.pyx'], working_path=base_path)

    config.add_extension(
        '_resample',
        sources=['_resample.c'],
        include_dirs=[get_numpy_include_dirs()],
        extra_compile_args=[
            "-fopenmp",
            "-pthread",
            "-O6",
            "-march=native",
            "-mtune=native",
            "-funroll-all-loops",
            "-fomit-frame-pointer",
            "-march=native",
            "-mtune=native",
            "-msse4",
            "-ftree-vectorize",
            "-ftree-vectorizer-verbose=5",
        ],
        extra_link_args=['-fopenmp'],
    )

    return config
Beispiel #11
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from skimage._build import cython

    config = Configuration('resample', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_resample.pyx'], working_path=base_path)

    config.add_extension(
        '_resample',
        sources=['_resample.c'],
        include_dirs=[get_numpy_include_dirs()],
        extra_compile_args=[
            "-fopenmp",
            "-pthread",
            "-O6",
            "-march=native",
            "-mtune=native",
            "-funroll-all-loops",
            "-fomit-frame-pointer",
            "-march=native",
            "-mtune=native",
            "-msse4",
            "-ftree-vectorize",
            "-ftree-vectorizer-verbose=5",
        ],
        extra_link_args=['-fopenmp'],
        )

    return config
Beispiel #12
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)
    config.add_data_dir('tests')

    cython([
        '_watershed.pyx', '_skeletonize_cy.pyx', '_convex_hull.pyx',
        '_greyreconstruct.pyx', '_extrema_cy.pyx'
    ],
           working_path=base_path)
    # _skeletonize_3d uses c++, so it must be cythonized separately
    cython(['_skeletonize_3d_cy.pyx.in'], working_path=base_path)

    config.add_extension('_watershed',
                         sources=['_watershed.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_cy',
                         sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull',
                         sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_greyreconstruct',
                         sources=['_greyreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_3d_cy',
                         sources=['_skeletonize_3d_cy.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language='c++')
    config.add_extension('_extrema_cy',
                         sources=['_extrema_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #13
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('measure', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_ccomp.pyx'], working_path=base_path)
    cython(['_find_contours_cy.pyx'], working_path=base_path)
    cython(['_moments_cy.pyx'], working_path=base_path)
    cython(['_marching_cubes_cy.pyx'], working_path=base_path)
    cython(['_pnpoly.pyx'], working_path=base_path)

    config.add_extension('_ccomp', sources=['_ccomp.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_contours_cy', sources=['_find_contours_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_moments_cy', sources=['_moments_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_marching_cubes_cy',
                         sources=['_marching_cubes_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_pnpoly', sources=['_pnpoly.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #14
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('segmentation', parent_package, top_path)

    cython([
        '_watershed_cy.pyx', '_felzenszwalb_cy.pyx', '_quickshift_cy.pyx',
        '_slic.pyx', '_remap.pyx'
    ],
           working_path=base_path)
    config.add_extension('_watershed_cy',
                         sources=['_watershed_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_felzenszwalb_cy',
                         sources=['_felzenszwalb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_quickshift_cy',
                         sources=['_quickshift_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_slic',
                         sources=['_slic.c'],
                         include_dirs=[get_numpy_include_dirs()])
    # note: the extra compiler flag -std=c++0x is needed to access the
    # std::unordered_map container on some earlier gcc compilers. See:
    # https://stackoverflow.com/a/3973692/224254
    config.add_extension('_remap',
                         sources='_remap.cpp',
                         include_dirs=[get_numpy_include_dirs()],
                         language='c++',
                         extra_compile_args=['-std=c++0x'])

    return config
Beispiel #15
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['corner_cy.pyx'], working_path=base_path)
    cython(['censure_cy.pyx'], working_path=base_path)
    cython(['orb_cy.pyx'], working_path=base_path)
    cython(['brief_cy.pyx'], working_path=base_path)
    cython(['_texture.pyx'], working_path=base_path)

    config.add_extension('corner_cy',
                         sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy',
                         sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('orb_cy',
                         sources=['orb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('brief_cy',
                         sources=['brief_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture',
                         sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #16
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('measure', parent_package, top_path)

    cython([
        '_find_contours_cy.pyx', '_find_contours_pbc_cy.pyx',
        '_find_tips_pbc_cy.pyx', '_find_tips_kernel_cy.pyx'
    ],
           working_path=base_path)

    # config.add_extension('_ccomp', sources=['_ccomp.c'],
    #                      include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_contours_cy',
                         sources=['_find_contours_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_contours_pbc_cy',
                         sources=['_find_contours_pbc_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_tips_pbc_cy',
                         sources=['_find_tips_pbc_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_find_tips_kernel_cy',
                         sources=['_find_tips_kernel_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    return config
Beispiel #17
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['cmorph.pyx'], working_path=base_path)
    cython(['_watershed.pyx'], working_path=base_path)
    cython(['_skeletonize_cy.pyx'], working_path=base_path)
    cython(['_convex_hull.pyx'], working_path=base_path)
    cython(['_greyreconstruct.pyx'], working_path=base_path)

    config.add_extension('cmorph',
                         sources=['cmorph.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershed',
                         sources=['_watershed.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_cy',
                         sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull',
                         sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_greyreconstruct',
                         sources=['_greyreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #18
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('io', parent_package, top_path)
    config.add_data_dir('tests')
    config.add_data_files('_plugins/*.ini')

    # This function tries to create C files from the given .pyx files.  If
    # it fails, we build the checked-in .c files.
    cython(['_plugins/_colormixer.pyx', '_plugins/_histograms.pyx'],
           working_path=base_path)

    config.add_extension('_plugins._colormixer',
                         sources=['_plugins/_colormixer.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_plugins._histograms',
                         sources=['_plugins/_histograms.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_plugins._tifffile',
                         sources=['_plugins/tifffile.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #19
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("filter_iter", parent_package, top_path)
    cython(["_filter_iter.pyx"], working_path=base_path)
    config.add_extension("_filter_iter", sources=["_filter_iter.c"], include_dirs=[get_numpy_include_dirs()])

    # config.add_extension('example_C_filters', sources=['example_C_filters.c'])

    return config
Beispiel #20
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("measure", parent_package, top_path)
    config.add_data_dir("tests")

    cython(["_find_contours.pyx"], working_path=base_path)

    config.add_extension("_find_contours", sources=["_find_contours.c"], include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #21
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('draw', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_draw.pyx'], working_path=base_path)

    config.add_extension('_draw', sources=['_draw.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #22
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('draw', parent_package, top_path)

    cython(['_draw.pyx'], working_path=base_path)

    config.add_extension('_draw',
                         sources=['_draw.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #23
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('graph', parent_package, top_path)

    # This function tries to create C files from the given .pyx files.  If
    # it fails, try to build with pre-generated .c files.
    cython(['_ncut_cy.pyx'], working_path=base_path)
    config.add_extension('_ncut_cy',
                         sources=['_ncut_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    return config
Beispiel #24
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_greycomatrix.pyx'], working_path=base_path)

    config.add_extension('_greycomatrix', sources=['_greycomatrix.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #25
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('graph', parent_package, top_path)
    config.add_data_dir('tests')

    # This function tries to create C files from the given .pyx files.  If
    # it fails, try to build with pre-generated .c files.
    cython(['_ncut_cy.pyx'], working_path=base_path)
    config.add_extension('_ncut_cy', sources=['_ncut_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    return config
Beispiel #26
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('filter', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_ctmf.pyx'], working_path=base_path)

    config.add_extension('_ctmf', sources=['_ctmf.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #27
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('WTP', parent_package, top_path)
    # config.add_data_dir('tests')

    cython(['_perform_WTP.pyx'], working_path=base_path)
    WTP_sources = ['_perform_WTP.c', 'perform_WTP_ljmu.c']
    config.add_extension('_perform_WTP',
                         sources=WTP_sources,
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #28
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('WTP', parent_package, top_path)
   # config.add_data_dir('tests')

    cython(['_perform_WTP.pyx'], working_path=base_path)
    WTP_sources = ['_perform_WTP.c', 'perform_WTP_ljmu.c']
    config.add_extension('_perform_WTP', sources=WTP_sources,
                         include_dirs=[get_numpy_include_dirs()])


    return config
Beispiel #29
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("feature", parent_package, top_path)
    config.add_data_dir("tests")

    cython(["_texture.pyx"], working_path=base_path)
    cython(["_template.pyx"], working_path=base_path)

    config.add_extension("_texture", sources=["_texture.c"], include_dirs=[get_numpy_include_dirs(), "../_shared"])
    config.add_extension("_template", sources=["_template.c"], include_dirs=[get_numpy_include_dirs(), "../_shared"])

    return config
Beispiel #30
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython([
        'corner_cy.pyx',
        'censure_cy.pyx',
        'orb_cy.pyx',
        'brief_cy.pyx',
        '_texture.pyx',
        '_hessian_det_appx.pyx',
        '_hoghistogram.pyx',
    ],
           working_path=base_path)
    # _haar uses c++, so it must be cythonized seperately
    cython(['_cascade.pyx', '_haar.pyx'], working_path=base_path)

    config.add_extension('_cascade',
                         sources=['_cascade.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language="c++")
    config.add_extension('corner_cy',
                         sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy',
                         sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('orb_cy',
                         sources=['orb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('brief_cy',
                         sources=['brief_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture',
                         sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_hessian_det_appx',
                         sources=['_hessian_det_appx.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_hoghistogram',
                         sources=['_hoghistogram.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_haar',
                         sources=['_haar.cpp'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'],
                         language="c++")

    return config
Beispiel #31
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('_shared', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['geometry.pyx'], working_path=base_path)
    cython(['transform.pyx'], working_path=base_path)

    config.add_extension('geometry', sources=['geometry.c'])
    config.add_extension('transform', sources=['transform.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #32
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("transform", parent_package, top_path)
    config.add_data_dir("tests")

    cython(["_hough_transform.pyx"], working_path=base_path)
    cython(["_warps_cy.pyx"], working_path=base_path)

    config.add_extension("_hough_transform", sources=["_hough_transform.c"], include_dirs=[get_numpy_include_dirs()])

    config.add_extension("_warps_cy", sources=["_warps_cy.c"], include_dirs=[get_numpy_include_dirs(), "../_shared"])

    return config
Beispiel #33
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('_shared', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['geometry.pyx'], working_path=base_path)
    cython(['transform.pyx'], working_path=base_path)

    config.add_extension('geometry', sources=['geometry.c'])
    config.add_extension('transform',
                         sources=['transform.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #34
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('WFT', parent_package, top_path)
   # config.add_data_dir('tests')

    cython(['_perform_WFT.pyx'], working_path=base_path)
    WTP_sources = ['_perform_WFT.c', 'wft2f.c']

    # libraries platform dependent??
    config.add_extension('_perform_WFT', sources=WTP_sources, libraries = ['fftw3', 'fftw3f', 'fftw3l', 'fftw3_threads',
'fftw3f_threads', 'fftw3l_threads'], include_dirs=[get_numpy_include_dirs()])


    return config
Beispiel #35
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('measure', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_find_contours.pyx'], working_path=base_path)
    cython(['_moments.pyx'], working_path=base_path)

    config.add_extension('_find_contours', sources=['_find_contours.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_moments', sources=['_moments.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #36
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('segmentation', parent_package, top_path)

    cython(['_felzenszwalb_cy.pyx',
            '_quickshift_cy.pyx',
            '_slic.pyx'], working_path=base_path)
    config.add_extension('_felzenszwalb_cy', sources=['_felzenszwalb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_quickshift_cy', sources=['_quickshift_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_slic', sources=['_slic.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #37
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('transform', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_hough_transform.pyx'], working_path=base_path)
    cython(['_warps_cy.pyx'], working_path=base_path)

    config.add_extension('_hough_transform', sources=['_hough_transform.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_warps_cy', sources=['_warps_cy.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'],
                         extra_compile_args=['-fopenmp'],
                         extra_link_args=['-fopenmp'])

    return config
Beispiel #38
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('WFT', parent_package, top_path)
    # config.add_data_dir('tests')

    cython(['_perform_WFT.pyx'], working_path=base_path)
    WTP_sources = ['_perform_WFT.c', 'wft2f.c']

    # libraries platform dependent??
    config.add_extension('_perform_WFT',
                         sources=WTP_sources,
                         libraries=[
                             'fftw3', 'fftw3f', 'fftw3l', 'fftw3_threads',
                             'fftw3f_threads', 'fftw3l_threads'
                         ],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #39
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
    from skimage._build import cython

    config = Configuration('resample', parent_package, top_path)

    cython(['_resample.pyx'], working_path=base_path)

    config.add_extension(
        '_resample',
        sources=['_resample.c'],
        include_dirs=[get_numpy_include_dirs()],
        extra_compile_args=[
            "-pthread",
            "-O4",
            "-fopenmp",
        ],
        extra_link_args=["-fopenmp"]
        )
    return config
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("io", parent_package, top_path)
    config.add_data_dir("tests")
    config.add_data_files("_plugins/*.ini")

    # This function tries to create C files from the given .pyx files.  If
    # it fails, we build the checked-in .c files.
    cython(["_plugins/_colormixer.pyx", "_plugins/_histograms.pyx"], working_path=base_path)

    config.add_extension(
        "_plugins._colormixer", sources=["_plugins/_colormixer.c"], include_dirs=[get_numpy_include_dirs()]
    )

    config.add_extension(
        "_plugins._histograms", sources=["_plugins/_histograms.c"], include_dirs=[get_numpy_include_dirs()]
    )

    return config
Beispiel #41
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('io', parent_package, top_path)
    config.add_data_files('_plugins/*.ini')

    # This function tries to create C files from the given .pyx files.  If
    # it fails, we build the checked-in .c files.
    cython(['_plugins/_colormixer.pyx', '_plugins/_histograms.pyx'],
           working_path=base_path)

    config.add_extension('_plugins._colormixer',
                         sources=['_plugins/_colormixer.c'],
                         include_dirs=[get_numpy_include_dirs()])

    config.add_extension('_plugins._histograms',
                         sources=['_plugins/_histograms.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #42
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)

    cython([
        '_skeletonize_cy.pyx', '_convex_hull.pyx', '_grayreconstruct.pyx',
        '_extrema_cy.pyx'
    ],
           working_path=base_path)
    # _skeletonize_3d uses c++, so it must be cythonized separately
    cython(['_skeletonize_3d_cy.pyx.in'], working_path=base_path)
    cython(['_extrema_cy.pyx'], working_path=base_path)
    cython(['_flood_fill_cy.pyx'], working_path=base_path)
    cython(['_max_tree.pyx'], working_path=base_path)

    config.add_extension('_skeletonize_cy',
                         sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull',
                         sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_grayreconstruct',
                         sources=['_grayreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_max_tree',
                         sources=['_max_tree.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_3d_cy',
                         sources=['_skeletonize_3d_cy.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language='c++')
    config.add_extension('_extrema_cy',
                         sources=['_extrema_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_flood_fill_cy',
                         sources=['_flood_fill_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    # add precomputed footprint decomposition data
    config.add_data_files('ball_decompositions.npy', 'disk_decompositions.npy')
    return config
Beispiel #43
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("morphology", parent_package, top_path)
    config.add_data_dir("tests")

    cython(["_watershed.pyx"], working_path=base_path)
    cython(["_skeletonize_cy.pyx"], working_path=base_path)
    cython(["_convex_hull.pyx"], working_path=base_path)
    cython(["_greyreconstruct.pyx"], working_path=base_path)
    cython(["_skeletonize_3d_cy.pyx.in"], working_path=base_path)

    config.add_extension("_watershed", sources=["_watershed.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension("_skeletonize_cy", sources=["_skeletonize_cy.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension("_convex_hull", sources=["_convex_hull.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension("_greyreconstruct", sources=["_greyreconstruct.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        "_skeletonize_3d_cy", sources=["_skeletonize_3d_cy.c"], include_dirs=[get_numpy_include_dirs()]
    )

    return config
Beispiel #44
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['corner_cy.pyx',
            'censure_cy.pyx',
            'orb_cy.pyx',
            'brief_cy.pyx',
            '_texture.pyx',
            '_hessian_det_appx.pyx',
            '_hoghistogram.pyx',
            ], working_path=base_path)
    # _haar uses c++, so it must be cythonized separately
    cython(['_cascade.pyx',
            '_haar.pyx'], working_path=base_path)

    config.add_extension('_cascade', sources=['_cascade.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language="c++")
    config.add_extension('corner_cy', sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy', sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('orb_cy', sources=['orb_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('brief_cy', sources=['brief_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture', sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_hessian_det_appx', sources=['_hessian_det_appx.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_hoghistogram', sources=['_hoghistogram.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_haar', sources=['_haar.cpp'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'],
                         language="c++")

    return config
Beispiel #45
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_watershed.pyx',
            '_skeletonize_cy.pyx',
            '_convex_hull.pyx',
            '_greyreconstruct.pyx',
            '_extrema_cy.pyx'], working_path=base_path)
    # _skeletonize_3d uses c++, so it must be cythonized separately
    cython(['_skeletonize_3d_cy.pyx.in'], working_path=base_path)
    cython(['_extrema_cy.pyx'], working_path=base_path)
    cython(['_flood_fill_cy.pyx'], working_path=base_path)
    cython(['_max_tree.pyx'], working_path=base_path)

    config.add_extension('_watershed', sources=['_watershed.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_cy', sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull', sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_greyreconstruct', sources=['_greyreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_max_tree', sources=['_max_tree.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_3d_cy',
                         sources=['_skeletonize_3d_cy.cpp'],
                         include_dirs=[get_numpy_include_dirs()],
                         language='c++')
    config.add_extension('_extrema_cy', sources=['_extrema_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_flood_fill_cy', sources=['_flood_fill_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #46
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('feature', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['corner_cy.pyx'], working_path=base_path)
    cython(['censure_cy.pyx'], working_path=base_path)
    cython(['_brief_cy.pyx'], working_path=base_path)
    cython(['_texture.pyx'], working_path=base_path)
    cython(['_template.pyx'], working_path=base_path)

    config.add_extension('corner_cy', sources=['corner_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('censure_cy', sources=['censure_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_brief_cy', sources=['_brief_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_texture', sources=['_texture.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('_template', sources=['_template.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])

    return config
Beispiel #47
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['cmorph.pyx'], working_path=base_path)
    cython(['_watershed.pyx'], working_path=base_path)
    cython(['_skeletonize_cy.pyx'], working_path=base_path)
    cython(['_convex_hull.pyx'], working_path=base_path)
    cython(['_greyreconstruct.pyx'], working_path=base_path)

    config.add_extension('cmorph', sources=['cmorph.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershed', sources=['_watershed.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_cy', sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull', sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_greyreconstruct', sources=['_greyreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #48
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("segmentation", parent_package, top_path)

    cython(["_felzenszwalb_cy.pyx"], working_path=base_path)
    config.add_extension("_felzenszwalb_cy", sources=["_felzenszwalb_cy.c"], include_dirs=[get_numpy_include_dirs()])
    cython(["_quickshift_cy.pyx"], working_path=base_path)
    config.add_extension("_quickshift_cy", sources=["_quickshift_cy.c"], include_dirs=[get_numpy_include_dirs()])
    cython(["_slic.pyx"], working_path=base_path)
    config.add_extension("_slic", sources=["_slic.c"], include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #49
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('exposure', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_unwrap_1d.pyx'], working_path=base_path)
    cython(['_unwrap_2d.pyx'], working_path=base_path)
    cython(['_unwrap_3d.pyx'], working_path=base_path)

    config.add_extension('_unwrap_1d', sources=['_unwrap_1d.c'],
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_2d = ['_unwrap_2d.c', 'unwrap_2d_ljmu.c']
    config.add_extension('_unwrap_2d', sources=unwrap_sources_2d,
                         include_dirs=[get_numpy_include_dirs()])
    unwrap_sources_3d = ['_unwrap_3d.c', 'unwrap_3d_ljmu.c']
    config.add_extension('_unwrap_3d', sources=unwrap_sources_3d,
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #50
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('_LBP', parent_package, top_path)
    #config.add_data_dir('tests')

    cython(['src/lbp_bins.pyx'], working_path=base_path)
    cython(['src/_lbp.pyx'], working_path=base_path)
    cython(['src/_lbp_ang.pyx'], working_path=base_path)
    cython(['src/_lbp_rad.pyx'], working_path=base_path)
    cython(['src/_nilbp.pyx'], working_path=base_path)
    cython(['src/_sp_neighbors.pyx'], working_path=base_path)
    cython(['src/boundary.pyx'], working_path=base_path)

    config.add_extension('lbp_bins',
                         sources=['src/lbp_bins.c'],
                         include_dirs=[get_numpy_include_dirs()])
    #include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_lbp',
                         sources=['src/_lbp.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_lbp_ang',
                         sources=['src/_lbp_ang.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_lbp_rad',
                         sources=['src/_lbp_rad.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_nilbp',
                         sources=['src/_nilbp.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_sp_neighbors',
                         sources=['src/_sp_neighbors.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('boundary',
                         sources=['src/boundary.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #51
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('morphology', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_watershed.pyx'], working_path=base_path)
    cython(['_watershedMod.pyx'], working_path=base_path)
    cython(['_watershedModStop.pyx'], working_path=base_path)
    cython(['_watershedModStopFast.pyx'], working_path=base_path)
    cython(['_watershedSimpleVelocity.pyx'], working_path=base_path)
    cython(['_watershedFlowLines.pyx'], working_path=base_path)
    cython(['_watershedFlowLinesWithoutRegion.pyx'], working_path=base_path)
    cython(['_skeletonize_cy.pyx'], working_path=base_path)
    cython(['_convex_hull.pyx'], working_path=base_path)
    cython(['_greyreconstruct.pyx'], working_path=base_path)
    cython(['_skeletonize_3d_cy.pyx.in'], working_path=base_path)

    config.add_extension('_watershed',
                         sources=['_watershed.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedMod',
                         sources=['_watershedMod.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedModStop',
                         sources=['_watershedModStop.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedModStopFast',
                         sources=['_watershedModStopFast.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedSimpleVelocity',
                         sources=['_watershedSimpleVelocity.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedFlowLines',
                         sources=['_watershedFlowLines.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_watershedFlowLinesWithoutRegion',
                         sources=['_watershedFlowLinesWithoutRegion.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_cy',
                         sources=['_skeletonize_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_convex_hull',
                         sources=['_convex_hull.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_greyreconstruct',
                         sources=['_greyreconstruct.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_skeletonize_3d_cy',
                         sources=['_skeletonize_3d_cy.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #52
0
import numpy as np
from skimage._build import cython

__version__ = '0.1.2'

if sys.argv[-1] == 'release':
    commands = [
        'python setup.py sdist upload',
        'git tag v{0}'.format(__version__),
        'git push origin master --tag',
    ]
    for cmd in commands:
        subprocess.call(cmd, shell=True)
    sys.exit(0)

cython(['_geometry.pyx'], working_path='pascal3d/utils')
ext_modules = [
    distutils.extension.Extension(
        'pascal3d.utils._geometry',
        sources=['pascal3d/utils/_geometry.c'],
        include_dirs=[np.get_include()],
    ),
]

setup(
    name='pascal3d',
    version=__version__,
    packages=find_packages(),
    author='Kentaro Wada',
    author_email='*****@*****.**',
    license='MIT',
Beispiel #53
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('filter', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_ctmf.pyx'], working_path=base_path)
    cython(['_denoise_cy.pyx'], working_path=base_path)
    cython(['rank/_core8.pyx'], working_path=base_path)
    cython(['rank/_core16.pyx'], working_path=base_path)
    cython(['rank/_crank8.pyx'], working_path=base_path)
    cython(['rank/_crank8_percentiles.pyx'], working_path=base_path)
    cython(['rank/_crank16.pyx'], working_path=base_path)
    cython(['rank/_crank16_percentiles.pyx'], working_path=base_path)
    cython(['rank/_crank16_bilateral.pyx'], working_path=base_path)
    cython(['rank/rank.pyx'], working_path=base_path)
    cython(['rank/percentile_rank.pyx'], working_path=base_path)
    cython(['rank/bilateral_rank.pyx'], working_path=base_path)

    config.add_extension('_ctmf', sources=['_ctmf.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_denoise_cy', sources=['_denoise_cy.c'],
        include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('rank/_core8', sources=['rank/_core8.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank/_core16', sources=['rank/_core16.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank/_crank8', sources=['rank/_crank8.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/_crank8_percentiles', sources=['rank/_crank8_percentiles.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank/_crank16', sources=['rank/_crank16.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/_crank16_percentiles', sources=['rank/_crank16_percentiles.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/_crank16_bilateral', sources=['rank/_crank16_bilateral.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/rank', sources=['rank/rank.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/percentile_rank', sources=['rank/percentile_rank.c'],
        include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        'rank/bilateral_rank', sources=['rank/bilateral_rank.c'],
        include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #54
0
def configuration(parent_package='', top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration('filter', parent_package, top_path)
    config.add_data_dir('tests')

    cython(['_ctmf.pyx'], working_path=base_path)
    cython(['_denoise_cy.pyx'], working_path=base_path)
    cython(['rank/_core8.pyx'], working_path=base_path)
    cython(['rank/_core16.pyx'], working_path=base_path)
    cython(['rank/_crank8.pyx'], working_path=base_path)
    cython(['rank/_crank8_percentiles.pyx'], working_path=base_path)
    cython(['rank/_crank16.pyx'], working_path=base_path)
    cython(['rank/_crank16_percentiles.pyx'], working_path=base_path)
    cython(['rank/_crank16_bilateral.pyx'], working_path=base_path)
    cython(['rank/percentile_rank.pyx'], working_path=base_path)
    cython(['rank/bilateral_rank.pyx'], working_path=base_path)

    config.add_extension('_ctmf',
                         sources=['_ctmf.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('_denoise_cy',
                         sources=['_denoise_cy.c'],
                         include_dirs=[get_numpy_include_dirs(), '../_shared'])
    config.add_extension('rank._core8',
                         sources=['rank/_core8.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._core16',
                         sources=['rank/_core16.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._crank8',
                         sources=['rank/_crank8.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._crank8_percentiles',
                         sources=['rank/_crank8_percentiles.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._crank16',
                         sources=['rank/_crank16.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._crank16_percentiles',
                         sources=['rank/_crank16_percentiles.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank._crank16_bilateral',
                         sources=['rank/_crank16_bilateral.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.percentile_rank',
                         sources=['rank/percentile_rank.c'],
                         include_dirs=[get_numpy_include_dirs()])
    config.add_extension('rank.bilateral_rank',
                         sources=['rank/bilateral_rank.c'],
                         include_dirs=[get_numpy_include_dirs()])

    return config
Beispiel #55
0
def configuration(parent_package="", top_path=None):
    from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs

    config = Configuration("measure", parent_package, top_path)
    config.add_data_dir("tests")

    cython(["_ccomp.pyx"], working_path=base_path)
    cython(["_find_contours_cy.pyx"], working_path=base_path)
    cython(["_moments_cy.pyx"], working_path=base_path)
    cython(["_marching_cubes_classic_cy.pyx"], working_path=base_path)
    cython(["_marching_cubes_lewiner_cy.pyx"], working_path=base_path)
    cython(["_pnpoly.pyx"], working_path=base_path)

    config.add_extension("_ccomp", sources=["_ccomp.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension("_find_contours_cy", sources=["_find_contours_cy.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension("_moments_cy", sources=["_moments_cy.c"], include_dirs=[get_numpy_include_dirs()])
    config.add_extension(
        "_marching_cubes_classic_cy", sources=["_marching_cubes_classic_cy.c"], include_dirs=[get_numpy_include_dirs()]
    )
    config.add_extension(
        "_marching_cubes_lewiner_cy", sources=["_marching_cubes_lewiner_cy.c"], include_dirs=[get_numpy_include_dirs()]
    )
    config.add_extension("_pnpoly", sources=["_pnpoly.c"], include_dirs=[get_numpy_include_dirs(), "../_shared"])

    return config