Skip to content
Snippets Groups Projects
Commit 2958fa62 authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Updated test data for zmask

parent 767790a6
No related branches found
No related tags found
No related merge requests found
......@@ -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 = {
......
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
......
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment