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
672218ca
Commit
672218ca
authored
1 year ago
by
Christopher Randolph Rhodes
Browse files
Options
Downloads
Patches
Plain Diff
Test that zmask can also be single z-slice
parent
37181f33
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
extensions/chaeo/tests/test_zstack.py
+13
-1
13 additions, 1 deletion
extensions/chaeo/tests/test_zstack.py
with
13 additions
and
1 deletion
extensions/chaeo/tests/test_zstack.py
+
13
−
1
View file @
672218ca
...
...
@@ -8,7 +8,7 @@ from extensions.chaeo.conf.testing import multichannel_zstack, pixel_classifier,
from
extensions.chaeo.products
import
export_patches_from_zstack
,
export_multichannel_patches_from_zstack
,
export_patch_masks_from_zstack
from
extensions.chaeo.zmask
import
build_zmask_from_object_mask
from
model_server.accessors
import
generate_file_accessor
,
InMemoryDataAccessor
,
write_accessor_data_to_file
from
extensions.ilastik.models
import
IlastikObjectClassifierModel
,
IlastikPixelClassifierModel
from
extensions.ilastik.models
import
IlastikPixelClassifierModel
class
TestZStackDerivedDataProducts
(
unittest
.
TestCase
):
...
...
@@ -57,6 +57,18 @@ class TestZStackDerivedDataProducts(unittest.TestCase):
return
zmask
,
meta
def
test_zmask_works_on_non_zstacks
(
self
,
**
kwargs
):
acc_zstack_slice
=
InMemoryDataAccessor
(
self
.
stack
.
data
[:,
:,
0
,
0
])
self
.
assertEqual
(
acc_zstack_slice
.
nz
,
1
)
zmask
,
meta
,
df
,
interm
=
build_zmask_from_object_mask
(
self
.
obmap
.
get_one_channel_data
(
0
),
acc_zstack_slice
,
mask_type
=
'
boxes
'
,
**
kwargs
,
)
zmask_acc
=
InMemoryDataAccessor
(
zmask
)
self
.
assertTrue
(
zmask_acc
.
is_mask
())
def
test_zmask_makes_correct_contours
(
self
):
return
self
.
test_zmask_makes_correct_boxes
(
mask_type
=
'
contours
'
)
...
...
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