Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Saad Jbabdi
CellCounting
Commits
15378346
Commit
15378346
authored
Sep 20, 2018
by
Saad Jbabdi
Browse files
Delete utils.py
parent
31eac793
Changes
1
Hide whitespace changes
Inline
Side-by-side
CellCounting/click_cells/utils.py
deleted
100644 → 0
View file @
31eac793
import
glymur
import
PIL
from
PIL
import
Image
import
matplotlib.pyplot
as
plt
fname
=
"/Users/saad/Desktop/FromJulia/mn96FS_c10_s4.jp2"
fname
=
"/Users/saad/grot/mn38c23LY_Neu13_10d_L.tif"
jp2
=
glymur
.
Jp2k
(
fname
)
step
=
2
**
3
thumbnail
=
jp2
[::
step
,::
step
]
plt
.
show
(
thumbnail
)
# Convert previous Matlab database to new format
import
scipy.io
as
sio
db
=
sio
.
loadmat
(
"/Users/saad/data/Haber_CellCounting/celldb.mat"
,
struct_as_record
=
False
,
squeeze_me
=
True
)
images
=
db
[
'celldb'
].
images
.
data
labels
=
-
db
[
'celldb'
].
images
.
label
+
2
import
numpy
as
np
images
=
data
.
transpose
(
3
,
0
,
1
,
2
)
outfile
=
"/Users/saad/data/Haber_CellCounting/celldb.npz"
shape
=
images
.
shape
[
1
:]
np
.
savez
(
outfile
,
counts
=
np
.
array
(
labels
).
flatten
(),
images
=
np
.
array
(
images
).
reshape
(
-
1
,
*
shape
))
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