Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SVLT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ALMF
SVLT
Commits
9a426b2e
Commit
9a426b2e
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
This seems to be an orphaned fragment of something else
parent
83f63a7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
model_server/base/batch.py
+0
-22
0 additions, 22 deletions
model_server/base/batch.py
with
0 additions
and
22 deletions
model_server/base/batch.py
deleted
100644 → 0
+
0
−
22
View file @
83f63a7f
def
get_tif_seq
(
where
,
prefix
=
None
,
verbose
=
True
):
files
=
[
ff
for
ff
in
os
.
listdir
(
where
)
if
ff
.
startswith
(
prefix
)]
files
.
sort
()
paths
=
[
where
/
fn
for
fn
in
files
]
ndas
=
[
imread
(
pa
.
__str__
())
for
pa
in
paths
]
assert
all
([
n
.
shape
==
ndas
[
0
].
shape
and
n
.
dtype
==
ndas
[
0
].
dtype
for
n
in
ndas
])
if
verbose
:
print
(
f
'
Successfully read
{
len
(
ndas
)
}
x
{
ndas
[
0
].
shape
}
px images of type
{
ndas
[
0
].
dtype
}
from:
\n
{
where
}
'
)
return
ndas
def
write_tif_zstack
(
data
,
desc
,
dtype
=
'
uint16
'
,
subdir
=
'
output
'
):
where
=
root
/
subdir
filename
=
desc
+
'
.tif
'
if
not
os
.
path
.
exists
(
where
):
os
.
makedirs
(
where
)
abspath
=
where
/
filename
imwrite
(
abspath
,
np
.
array
(
data
).
astype
(
dtype
),
imagej
=
True
)
print
(
f
'
Successfully wrote
{
len
(
data
)
}
x
{
data
[
0
].
shape
}
px images of type
{
dtype
}
to:
\n
{
abspath
}
'
)
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment