def run(): data_storage.create_database() files = glob.glob(cfg.datasetRoot + '/*.png') for img in files: image = io.imread(img) d, f, c = training.training_an_image(image) sn = get_name(img) print(len(files)) print(img) print(sn) print(c) s = io.plugin_order() print(s) data_storage.create_group(sn)
def test_plugin_order(self): p = io.plugin_order() assert 'imread' in p assert 'test' in p['imread']
def test_plugin_order(): p = io.plugin_order() assert 'imread' in p assert 'test' in p['imread']
import os import skimage as si import skimage.io as sio import numpy as np from numpy.testing import * from numpy.testing.decorators import skipif from tempfile import NamedTemporaryFile try: import skimage.io._plugins.tifffile_plugin as tf _plugins = sio.plugin_order() TF_available = True sio.use_plugin('tifffile') except ImportError: TF_available = False def teardown(): sio.reset_plugins() @skipif(not TF_available) def test_imread_uint16(): expected = np.load(os.path.join(si.data_dir, 'chessboard_GRAY_U8.npy')) img = sio.imread(os.path.join(si.data_dir, 'chessboard_GRAY_U16.tif')) assert img.dtype == np.uint16 assert_array_almost_equal(img, expected) @skipif(not TF_available)
def test_plugin_order(self): p = io.plugin_order() assert "imread" in p assert "test" in p["imread"]