diff options
author | Daniil Kazantsev <dkazanc@hotmail.com> | 2019-06-02 14:07:14 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-02 14:07:14 +0100 |
commit | 57229985e3576db6a714d7e4a35aec4f47120e1b (patch) | |
tree | 8716aa2a793e525692e2516133d438e97c124f4f /test/testroutines.py | |
parent | 5fb5be32360bab1b6619bcef192dde0878d014ff (diff) | |
parent | a532c5efb8f20a8eb400fdad0edc00dad50a5c46 (diff) | |
download | regularization-57229985e3576db6a714d7e4a35aec4f47120e1b.tar.gz regularization-57229985e3576db6a714d7e4a35aec4f47120e1b.tar.bz2 regularization-57229985e3576db6a714d7e4a35aec4f47120e1b.tar.xz regularization-57229985e3576db6a714d7e4a35aec4f47120e1b.zip |
Merge pull request #124 from vais-ral/tests_nopillow
Dropping pillow dependency fot unittests
Diffstat (limited to 'test/testroutines.py')
-rw-r--r-- | test/testroutines.py | 9 |
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): |