import makeunitdb from params import Params from postmethods import postNPZ, getNPZ import kvengine_to_test import site_to_test SITE_HOST = site_to_test.site from ocptype import UINT8, UINT16, UINT32, ANNOTATION, IMAGE from OCP import celery_app p = Params() p.token = 'unittest' p.channels = ['testchannel'] p.args = (0, 1024, 0, 1024, 1, 11) class Test_Histogram8: def setup_class(self): """Create the unittest database""" makeunitdb.createTestDB(p.token, p.channels, channel_type=IMAGE, channel_datatype=UINT8, public=True, ximagesize=1024, yimagesize=1024, zimagesize=10, xvoxelres=1.0, yvoxelres=1.0,
import makeunitdb from params import Params from postmethods import postNPZ, getNPZ import kvengine_to_test import site_to_test SITE_HOST = site_to_test.site from ocptype import UINT8, UINT16, UINT32, ANNOTATION, IMAGE from OCP import celery_app p = Params() p.token = 'unittest' p.channels = ['testchannel'] p.args = (0,1024,0,1024,1,11) class Test_Histogram8: def setup_class(self): """Create the unittest database""" makeunitdb.createTestDB(p.token, p.channels, channel_type=IMAGE, channel_datatype=UINT8, public=True, ximagesize=1024, yimagesize=1024, zimagesize=10, xvoxelres=1.0, yvoxelres=1.0, zvoxelres=10.0, readonly=0) def teardown_class (self): """Destroy the unittest database""" makeunitdb.deleteTestDB(p.token) def test_genhistogram (self): """Test generating an 8bit histogram""" image_data = np.random.randint(0, high=255, size=[1, 10, 1024, 1024]).astype(np.uint8)