Пример #1
0
def test_make_grey_depth2_fails():
    inputData = np.zeros((256, 256), dtype=np.uint8)

    with pytest.raises(ValueError):
        imdata = untiler.make_image_array(inputData, 256)

    print("# OK - %s " % (inspect.stack()[0][3]))
Пример #2
0
def test_make_rgb_imagedata():
    inputData = np.zeros((3, 256, 256), dtype=np.uint8)

    imdata = untiler.make_image_array(inputData, 256)

    assert imdata.shape == (4, 256, 256)
    print("# OK - %s " % (inspect.stack()[0][3]))
Пример #3
0
def test_make_grey_depth2_fails():
    inputData = np.zeros((256, 256), dtype=np.uint8)

    with pytest.raises(ValueError):
        imdata = untiler.make_image_array(inputData, 256)

    print("# OK - %s " % (inspect.stack()[0][3]))
Пример #4
0
def test_make_rgb_imagedata():
    inputData = np.zeros((3, 256, 256), dtype=np.uint8)

    imdata = untiler.make_image_array(inputData, 256)

    assert imdata.shape == (4, 256, 256)
    print("# OK - %s " % (inspect.stack()[0][3]))
Пример #5
0
def test_make_grey_imagedata():
    inputData = np.zeros((1, 256, 256), dtype=np.uint8)

    imdata = untiler.make_image_array(inputData, 256)

    assert imdata.shape == (4, 256, 256)

    assert np.array_equal(imdata[-1], np.zeros((256, 256), dtype=np.uint8) + 255)

    assert np.array_equal(imdata[0], imdata[1])

    assert np.array_equal(imdata[1], imdata[2])
    print("# OK - %s " % (inspect.stack()[0][3]))
Пример #6
0
def test_make_grey_imagedata():
    inputData = np.zeros((1, 256, 256), dtype=np.uint8)

    imdata = untiler.make_image_array(inputData, 256)

    assert imdata.shape == (4, 256, 256)

    assert np.array_equal(imdata[-1],
                          np.zeros((256, 256), dtype=np.uint8) + 255)

    assert np.array_equal(imdata[0], imdata[1])

    assert np.array_equal(imdata[1], imdata[2])
    print("# OK - %s " % (inspect.stack()[0][3]))