summaryrefslogtreecommitdiffstats
path: root/test/testroutines.py
diff options
context:
space:
mode:
authorDaniil Kazantsev <dkazanc@hotmail.com>2019-06-02 13:35:52 +0100
committerDaniil Kazantsev <dkazanc@hotmail.com>2019-06-02 13:35:52 +0100
commita532c5efb8f20a8eb400fdad0edc00dad50a5c46 (patch)
tree8716aa2a793e525692e2516133d438e97c124f4f /test/testroutines.py
parent7c07fde6955537085c7f7e563054aefac219a63c (diff)
downloadregularization-a532c5efb8f20a8eb400fdad0edc00dad50a5c46.tar.gz
regularization-a532c5efb8f20a8eb400fdad0edc00dad50a5c46.tar.bz2
regularization-a532c5efb8f20a8eb400fdad0edc00dad50a5c46.tar.xz
regularization-a532c5efb8f20a8eb400fdad0edc00dad50a5c46.zip
tests run without pillow
Diffstat (limited to 'test/testroutines.py')
-rw-r--r--test/testroutines.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/testroutines.py b/test/testroutines.py
index 8da5c5e..64e56e3 100644
--- a/test/testroutines.py
+++ b/test/testroutines.py
@@ -1,10 +1,17 @@
import numpy as np
-from PIL import Image
+#from PIL import Image
+"""
class TiffReader(object):
def imread(self, filename):
return np.asarray(Image.open(filename))
+"""
+class BinReader(object):
+ def imread(self, filename):
+ w, h = 512, 512
+ with open(filename, mode='rb') as f:
+ return np.fromfile(f,dtype=np.uint8,count=w*h).reshape(h,w)
###############################################################################
def printParametersToString(pars):