mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-28 20:40:21 +08:00
+4
-3
@@ -33,7 +33,8 @@ UseBackends: Waf
|
||||
Library:
|
||||
Packages:
|
||||
skimage, skimage.color, skimage.data, skimage.draw, skimage.exposure,
|
||||
skimage.feature, skimage.filters, skimage.graph, skimage.io,
|
||||
skimage.feature, skimage.filters, skimage.future, skimage.future.graph,
|
||||
skimage.graph, skimage.io,
|
||||
skimage.io._plugins, skimage.measure, skimage.morphology,
|
||||
skimage.scripts, skimage.restoration, skimage.segmentation,
|
||||
skimage.transform, skimage.util
|
||||
@@ -151,9 +152,9 @@ Library:
|
||||
Extension: skimage.feature._hessian_det_appx
|
||||
Sources:
|
||||
skimage/exposure/_hessian_det_appx.pyx
|
||||
Extension: skimage.graph._ncut_cy
|
||||
Extension: skimage.future.graph._ncut_cy
|
||||
Sources:
|
||||
skimage/graph/_ncut_cy.pyx
|
||||
skimage/future/graph/_ncut_cy.pyx
|
||||
Extension: skimage.external.tifffile._tifffile
|
||||
Sources:
|
||||
skimage/external/tifffile/_tifffile.c
|
||||
|
||||
@@ -12,7 +12,8 @@ References
|
||||
Pattern Analysis and Machine Intelligence,
|
||||
IEEE Transactions on, vol. 22, no. 8, pp. 888-905, August 2000.
|
||||
"""
|
||||
from skimage import graph, data, io, segmentation, color
|
||||
from skimage import data, io, segmentation, color
|
||||
from skimage.future import graph
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The example below also shows how to use a custom function to select the larger
|
||||
weight instead.
|
||||
|
||||
"""
|
||||
from skimage.graph import rag
|
||||
from skimage.future.graph import rag
|
||||
import networkx as nx
|
||||
from matplotlib import pyplot as plt
|
||||
import numpy as np
|
||||
|
||||
@@ -6,7 +6,8 @@ Drawing Region Adjacency Graphs (RAGs)
|
||||
This example constructs a Region Adjacency Graph (RAG) and draws it with
|
||||
the `rag_draw` method.
|
||||
"""
|
||||
from skimage import graph, data, segmentation
|
||||
from skimage import data, segmentation
|
||||
from skimage.future import graph
|
||||
from matplotlib import pyplot as plt, colors
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ difference in mean color. We then join regions with similar mean color.
|
||||
|
||||
"""
|
||||
|
||||
from skimage import graph, data, io, segmentation, color
|
||||
from skimage import data, io, segmentation, color
|
||||
from skimage.future import graph
|
||||
from matplotlib import pyplot as plt
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ until no highly similar region pairs remain.
|
||||
|
||||
"""
|
||||
|
||||
from skimage import graph, data, io, segmentation, color
|
||||
from skimage import data, io, segmentation, color
|
||||
from skimage.future import graph
|
||||
import numpy as np
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
"""Functionality with an experimental API. Although you can count on the
|
||||
functions in this package being around in the future, the API may change with
|
||||
any version update **and will not follow the skimage two-version deprecation
|
||||
path**. Therefore, use the functions herein with care, and do not use them in
|
||||
production code that will depend on updated skimage versions.
|
||||
"""
|
||||
|
||||
from . import graph
|
||||
|
||||
__all__ = ['graph']
|
||||
@@ -0,0 +1,12 @@
|
||||
from .graph_cut import cut_threshold, cut_normalized
|
||||
from .rag import rag_mean_color, RAG, draw_rag
|
||||
from .graph_merge import merge_hierarchical
|
||||
ncut = cut_normalized
|
||||
|
||||
__all__ = ['rag_mean_color',
|
||||
'cut_threshold',
|
||||
'cut_normalized',
|
||||
'ncut',
|
||||
'draw_rag',
|
||||
'merge_hierarchical',
|
||||
'RAG']
|
||||
@@ -37,7 +37,8 @@ def cut_threshold(labels, rag, thresh, in_place=True):
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from skimage import data, graph, segmentation
|
||||
>>> from skimage import data, segmentation
|
||||
>>> from skimage.future import graph
|
||||
>>> img = data.astronaut()
|
||||
>>> labels = segmentation.slic(img)
|
||||
>>> rag = graph.rag_mean_color(img, labels)
|
||||
@@ -107,7 +108,8 @@ def cut_normalized(labels, rag, thresh=0.001, num_cuts=10, in_place=True,
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from skimage import data, graph, segmentation
|
||||
>>> from skimage import data, segmentation
|
||||
>>> from skimage.future import graph
|
||||
>>> img = data.astronaut()
|
||||
>>> labels = segmentation.slic(img, compactness=30, n_segments=400)
|
||||
>>> rag = graph.rag_mean_color(img, labels, mode='similarity')
|
||||
@@ -14,7 +14,7 @@ import numpy as np
|
||||
from scipy.ndimage import filters
|
||||
from scipy import ndimage as nd
|
||||
import math
|
||||
from .. import draw, measure, segmentation, util, color
|
||||
from ... import draw, measure, segmentation, util, color
|
||||
try:
|
||||
from matplotlib import colors
|
||||
from matplotlib import cm
|
||||
@@ -251,7 +251,8 @@ def rag_mean_color(image, labels, connectivity=2, mode='distance',
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from skimage import data, graph, segmentation
|
||||
>>> from skimage import data, segmentation
|
||||
>>> from skimage.future import graph
|
||||
>>> img = data.astronaut()
|
||||
>>> labels = segmentation.slic(img)
|
||||
>>> rag = graph.rag_mean_color(img, labels)
|
||||
@@ -364,7 +365,8 @@ def draw_rag(labels, rag, img, border_color=None, node_color='#ffff00',
|
||||
|
||||
Examples
|
||||
--------
|
||||
>>> from skimage import data, graph, segmentation
|
||||
>>> from skimage import data, segmentation
|
||||
>>> from skimage.future import graph
|
||||
>>> img = data.coffee()
|
||||
>>> labels = segmentation.slic(img)
|
||||
>>> g = graph.rag_mean_color(img, labels)
|
||||
@@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
from skimage._build import cython
|
||||
import os.path
|
||||
|
||||
base_path = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
|
||||
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
|
||||
|
||||
if __name__ == '__main__':
|
||||
from numpy.distutils.core import setup
|
||||
setup(maintainer='scikit-image Developers',
|
||||
maintainer_email='scikit-image@googlegroups.com',
|
||||
description='Graph-based Image-processing Algorithms',
|
||||
url='https://github.com/scikit-image/scikit-image',
|
||||
license='Modified BSD',
|
||||
**(configuration(top_path='').todict())
|
||||
)
|
||||
@@ -1,5 +1,5 @@
|
||||
import numpy as np
|
||||
from skimage import graph
|
||||
from skimage.future import graph
|
||||
from skimage._shared.version_requirements import is_installed
|
||||
from numpy.testing.decorators import skipif
|
||||
from skimage import segmentation
|
||||
@@ -0,0 +1,12 @@
|
||||
|
||||
def configuration(parent_package='skimage', top_path=None):
|
||||
from numpy.distutils.misc_util import Configuration
|
||||
config = Configuration('future', parent_package, top_path)
|
||||
config.add_subpackage('graph')
|
||||
return config
|
||||
|
||||
if __name__ == "__main__":
|
||||
from numpy.distutils.core import setup
|
||||
|
||||
config = configuration(top_path='').todict()
|
||||
setup(**config)
|
||||
@@ -1,9 +1,5 @@
|
||||
from .spath import shortest_path
|
||||
from .mcp import MCP, MCP_Geometric, MCP_Connect, MCP_Flexible, route_through_array
|
||||
from .graph_cut import cut_threshold, cut_normalized
|
||||
from .rag import rag_mean_color, RAG, draw_rag
|
||||
from .graph_merge import merge_hierarchical
|
||||
ncut = cut_normalized
|
||||
|
||||
|
||||
__all__ = ['shortest_path',
|
||||
|
||||
@@ -17,7 +17,6 @@ def configuration(parent_package='', top_path=None):
|
||||
cython(['_spath.pyx'], working_path=base_path)
|
||||
cython(['_mcp.pyx'], working_path=base_path)
|
||||
cython(['heap.pyx'], working_path=base_path)
|
||||
cython(['_ncut_cy.pyx'], working_path=base_path)
|
||||
|
||||
config.add_extension('_spath', sources=['_spath.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
@@ -25,8 +24,6 @@ def configuration(parent_package='', top_path=None):
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('heap', sources=['heap.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
config.add_extension('_ncut_cy', sources=['_ncut_cy.c'],
|
||||
include_dirs=[get_numpy_include_dirs()])
|
||||
return config
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -14,6 +14,7 @@ def configuration(parent_package='', top_path=None):
|
||||
config.add_subpackage('feature')
|
||||
config.add_subpackage('restoration')
|
||||
config.add_subpackage('filters')
|
||||
config.add_subpackage('future')
|
||||
config.add_subpackage('graph')
|
||||
config.add_subpackage('io')
|
||||
config.add_subpackage('measure')
|
||||
|
||||
Reference in New Issue
Block a user