|
27 | 27 | computer vision. Journal of Open Research Software, 1:e3, DOI: |
28 | 28 | https://dx.doi.org/10.5334/jors.ac |
29 | 29 | ''' |
30 | | -try: |
31 | | - from .bbox import bbox, croptobbox |
32 | | - from .center_of_mass import center_of_mass |
33 | | - from .convolve import convolve, \ |
34 | | - convolve1d, \ |
35 | | - find, \ |
36 | | - mean_filter, \ |
37 | | - median_filter, \ |
38 | | - rank_filter, \ |
39 | | - template_match, \ |
40 | | - gaussian_filter1d, \ |
41 | | - gaussian_filter, \ |
42 | | - laplacian_2D |
43 | | - from .convolve import haar, ihaar, daubechies, idaubechies, wavelet_center, wavelet_decenter |
44 | | - from .distance import distance |
45 | | - from .edge import sobel, dog |
46 | | - from .euler import euler |
47 | | - from .histogram import fullhistogram |
48 | | - from .labeled import border, borders, bwperim, label, labeled_sum |
49 | | - from .features.moments import moments |
50 | | - from .morph import cdilate, \ |
51 | | - cerode, \ |
52 | | - close, \ |
53 | | - close_holes, \ |
54 | | - cwatershed, \ |
55 | | - disk, \ |
56 | | - dilate, \ |
57 | | - erode, \ |
58 | | - get_structuring_elem, \ |
59 | | - hitmiss, \ |
60 | | - locmax, \ |
61 | | - locmin, \ |
62 | | - majority_filter, \ |
63 | | - open, \ |
64 | | - regmin, \ |
65 | | - regmax |
66 | | - from .resize import imresize, resize_to |
67 | | - from .stretch import as_rgb, \ |
68 | | - overlay, \ |
69 | | - stretch, \ |
70 | | - stretch_rgb |
71 | | - from .thin import thin |
72 | | - from .thresholding import otsu, rc |
73 | | - from .io import imread, imsave |
74 | | - |
75 | | - from .tests import run as test |
76 | | - |
77 | | - from .mahotas_version import __version__ |
78 | | - |
79 | | - from . import colors |
80 | | - from . import demos |
81 | | - from . import features |
82 | | - from . import morph |
83 | | - from . import polygon |
84 | | - from . import segmentation |
85 | | -except ImportError: # pragma: no cover |
86 | | - import sys |
87 | | - _,e,_ = sys.exc_info() |
88 | | - from sys import stderr |
89 | | - stderr.write('''\ |
90 | | -Could not import submodules (exact error was: %s). |
91 | | -
|
92 | | -There are many reasons for this error the most common one is that you have |
93 | | -either not built the packages or have built (using `python setup.py build`) or |
94 | | -installed them (using `python setup.py install`) and then proceeded to test |
95 | | -mahotas **without changing the current directory**. |
96 | | -
|
97 | | -Try installing and then changing to another directory before importing mahotas. |
98 | | -''' % e) |
| 30 | +from .bbox import bbox, croptobbox |
| 31 | +from .center_of_mass import center_of_mass |
| 32 | +from .convolve import convolve, \ |
| 33 | + convolve1d, \ |
| 34 | + find, \ |
| 35 | + mean_filter, \ |
| 36 | + median_filter, \ |
| 37 | + rank_filter, \ |
| 38 | + template_match, \ |
| 39 | + gaussian_filter1d, \ |
| 40 | + gaussian_filter, \ |
| 41 | + laplacian_2D |
| 42 | +from .convolve import haar, ihaar, daubechies, idaubechies, wavelet_center, wavelet_decenter |
| 43 | +from .distance import distance |
| 44 | +from .edge import sobel, dog |
| 45 | +from .euler import euler |
| 46 | +from .histogram import fullhistogram |
| 47 | +from .labeled import border, borders, bwperim, label, labeled_sum |
| 48 | +from .features.moments import moments |
| 49 | +from .morph import cdilate, \ |
| 50 | + cerode, \ |
| 51 | + close, \ |
| 52 | + close_holes, \ |
| 53 | + cwatershed, \ |
| 54 | + disk, \ |
| 55 | + dilate, \ |
| 56 | + erode, \ |
| 57 | + get_structuring_elem, \ |
| 58 | + hitmiss, \ |
| 59 | + locmax, \ |
| 60 | + locmin, \ |
| 61 | + majority_filter, \ |
| 62 | + open, \ |
| 63 | + regmin, \ |
| 64 | + regmax |
| 65 | +from .resize import imresize, resize_to |
| 66 | +from .stretch import as_rgb, \ |
| 67 | + overlay, \ |
| 68 | + stretch, \ |
| 69 | + stretch_rgb |
| 70 | +from .thin import thin |
| 71 | +from .thresholding import otsu, rc |
| 72 | +from .io import imread, imsave |
| 73 | + |
| 74 | +from .tests import run as test |
| 75 | + |
| 76 | +from .mahotas_version import __version__ |
| 77 | + |
| 78 | +from . import colors |
| 79 | +from . import demos |
| 80 | +from . import features |
| 81 | +from . import morph |
| 82 | +from . import polygon |
| 83 | +from . import segmentation |
99 | 84 |
|
100 | 85 | citation_text = ''' |
101 | 86 | If you use mahotas please cite |
@@ -202,4 +187,3 @@ def citation(print_out=True, short=False): |
202 | 187 | 'citation_text', |
203 | 188 | '__version__', |
204 | 189 | ] |
205 | | - |
0 commit comments