MAINT: move new skeletonize3d files to more appropriate places

This commit is contained in:
Evgeni Burovski
2016-02-02 14:26:33 +00:00
parent e421cea331
commit a85c9ddd3c
31 changed files with 18 additions and 5 deletions
+1
View File
@@ -6,6 +6,7 @@ from .selem import (square, rectangle, diamond, disk, cube, octahedron, ball,
octagon, star)
from .watershed import watershed
from ._skeletonize import skeletonize, medial_axis
from .skel import compute_thin_image as compute_thin_image
from .convex_hull import convex_hull_image, convex_hull_object
from .greyreconstruct import reconstruction
from .misc import remove_small_objects, remove_small_holes

Before

Width:  |  Height:  |  Size: 251 B

After

Width:  |  Height:  |  Size: 251 B

Before

Width:  |  Height:  |  Size: 248 B

After

Width:  |  Height:  |  Size: 248 B

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

Before

Width:  |  Height:  |  Size: 94 B

After

Width:  |  Height:  |  Size: 94 B

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 149 B

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

Before

Width:  |  Height:  |  Size: 137 B

After

Width:  |  Height:  |  Size: 137 B

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 149 B

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 176 B

@@ -1,11 +1,14 @@
from __future__ import division, print_function, absolute_import
import os
import numpy as np
from numpy.testing import assert_equal
import skimage
from skimage import io
from skel import compute_thin_image
from skimage.morphology import compute_thin_image
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
@@ -23,9 +26,18 @@ def test_simple_3d():
yield check_skel_3d, fname
def get_data_path():
# XXX this is a bad temp hack
return os.path.join(os.path.split(skimage.__file__)[0],
'morphology',
'tests',
'data')
def check_skel(fname, viz=False):
# compute the thin image and compare the result to that of ImageJ
img = np.loadtxt('data/' + fname + '.txt', dtype=np.uint8)
img = np.loadtxt(os.path.join(get_data_path(), fname+'.txt'), dtype=np.uint8)
if viz:
ax = _viz(img, **dict(marker='s', color='b', s=99, alpha=0.2))
@@ -38,7 +50,7 @@ def check_skel(fname, viz=False):
s=80, alpha=0.7, label='us'))
# compare to FIJI
img_f = np.loadtxt('data/' + fname + '_fiji.txt', dtype=np.uint8)
img_f = np.loadtxt(os.path.join(get_data_path(), fname+'_fiji.txt'), dtype=np.uint8)
if not viz:
# actually compare images
@@ -70,8 +82,8 @@ def _viz(img, ax=None, **kwds):
def check_skel_3d(fname):
img = io.imread('data/' + fname + '.tif')
img_f = io.imread('data/' + fname + '_fiji.tif')
img = io.imread(os.path.join(get_data_path(), fname+'.tif'))
img_f = io.imread(os.path.join(get_data_path(), fname+'_fiji.tif'))
img_s = compute_thin_image(img)
assert_equal(img_s, img_f)