Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
model_server
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
Christopher Randolph Rhodes
model_server
Commits
2958fa62
Commit
2958fa62
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Updated test data for zmask
parent
767790a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
extensions/chaeo/conf/testing.py
+6
-6
6 additions, 6 deletions
extensions/chaeo/conf/testing.py
extensions/chaeo/test_zstack.py
+2
-0
2 additions, 0 deletions
extensions/chaeo/test_zstack.py
model_server/accessors.py
+12
-0
12 additions, 0 deletions
model_server/accessors.py
with
20 additions
and
6 deletions
extensions/chaeo/conf/testing.py
+
6
−
6
View file @
2958fa62
...
...
@@ -2,12 +2,12 @@ from pathlib import Path
root
=
Path
.
home
()
/
'
model-server
'
czi_
multichannel_zstack
=
{
'
path
'
:
root
/
'
testing
'
/
'
proj0004-exp0038-SelectionA10-01.czi
'
,
'
w
'
:
2048
,
'
h
'
:
2048
,
'
c
'
:
5
,
'
z
'
:
21
,
multichannel_zstack
=
{
'
path
'
:
root
/
'
testing
'
/
'
zmask-test-stack.tif
'
,
'
w
'
:
512
,
'
h
'
:
512
,
'
c
'
:
2
,
'
z
'
:
7
,
}
pixel_classifier
=
{
...
...
This diff is collapsed.
Click to expand it.
extensions/chaeo/test_zstack.py
+
2
−
0
View file @
2958fa62
import
unittest
from
extensions.chaeo.conf.testing
import
multichannel_zstack
,
pixel_classifier
from
extensions.chaeo.zstack
import
build_stack_mask
from
model_server.accessors
import
InMemoryDataAccessor
...
...
@@ -7,6 +8,7 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
def
setUp
(
self
)
->
None
:
# need test data incl obj map
self
.
zstack
=
self
.
obmap
=
None
self
.
stack
=
None
...
...
This diff is collapsed.
Click to expand it.
model_server/accessors.py
+
12
−
0
View file @
2958fa62
...
...
@@ -67,6 +67,18 @@ class GenericImageFileAccessor(GenericImageDataAccessor): # image data is loaded
raise
FileAccessorError
(
f
'
Could not find file at
{
fpath
}
'
)
self
.
fpath
=
fpath
class
ImageJTiffFileAccessor
(
GenericImageFileAccessor
):
def
__init__
(
self
,
fpath
:
Path
):
super
().
__init__
(
fpath
)
try
:
tf
=
tifffile
.
TiffFile
(
fpath
)
self
.
tf
=
tf
except
Exception
:
FileAccessorError
(
f
'
Unable to access data in
{
fpath
}
'
)
self
.
_data
=
tf
.
asarray
()
class
CziImageFileAccessor
(
GenericImageFileAccessor
):
"""
Image that is stored in a Zeiss .CZI file; may be multi-channel, and/or a z-stack,
...
...
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