Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GEPARD
GEPARD
Commits
f1fe95fd
Commit
f1fe95fd
authored
Jul 21, 2019
by
Lars Bittrich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tranformation fix to separate the previous implicit image orientation in pixel sign values
parent
10e10e12
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
681 additions
and
652 deletions
+681
-652
analysis/database.py
analysis/database.py
+1
-1
dataset.py
dataset.py
+411
-386
helperfunctions.py
helperfunctions.py
+11
-0
zeissimporter.py
zeissimporter.py
+258
-265
No files found.
analysis/database.py
View file @
f1fe95fd
...
...
@@ -44,7 +44,7 @@ class DataBaseWindow(QtWidgets.QMainWindow):
self
.
path
=
os
.
path
.
join
(
Path
.
home
(),
'gepard'
,
'databases'
)
self
.
importPath
=
self
.
path
if
not
os
.
path
.
exists
(
self
.
path
):
os
.
m
k
dir
(
self
.
path
)
os
.
m
ake
dir
s
(
self
.
path
)
self
.
activeDatabase
=
None
self
.
activeSpectrum
=
None
self
.
activeSpectrumName
=
None
...
...
dataset.py
View file @
f1fe95fd
This diff is collapsed.
Click to expand it.
helperfunctions.py
View file @
f1fe95fd
...
...
@@ -23,7 +23,16 @@ import numpy as np
import
cv2
import
os
try
:
from
skimage.io
import
imread
as
skimread
from
skimage.io
import
imsave
as
skimsave
except
ImportError
:
skimread
=
None
skimsave
=
None
def
cv2imread_fix
(
fname
,
flags
=
cv2
.
IMREAD_COLOR
):
if
skimread
is
not
None
:
return
skimread
(
fname
,
as_gray
=
(
flags
==
cv2
.
IMREAD_GRAYSCALE
))
with
open
(
fname
,
"rb"
)
as
fp
:
cont
=
fp
.
read
()
img
=
cv2
.
imdecode
(
np
.
fromstring
(
cont
,
dtype
=
np
.
uint8
),
flags
)
...
...
@@ -31,6 +40,8 @@ def cv2imread_fix(fname, flags=cv2.IMREAD_COLOR):
return
None
def
cv2imwrite_fix
(
fname
,
img
,
params
=
None
):
if
skimsave
is
not
None
:
skimsave
(
fname
,
img
)
pathname
,
ext
=
os
.
path
.
splitext
(
fname
)
if
params
is
None
:
ret
,
data
=
cv2
.
imencode
(
ext
,
img
)
...
...
zeissimporter.py
View file @
f1fe95fd
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment