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

Added object method to write to and class method to read from file

parent 87d32037
No related branches found
No related tags found
2 merge requests!50Release 2024.06.03,!44Connectivity of labeling
......@@ -73,6 +73,9 @@ class GenericImageDataAccessor(ABC):
def dtype(self):
return self.data.dtype
def write(self, fp: Path, mkdir=True):
write_accessor_data_to_file(fp, self, mkdir=mkdir)
def get_axis(self, ch):
return self.axes.index(ch.upper())
......@@ -122,6 +125,10 @@ class GenericImageFileAccessor(GenericImageDataAccessor): # image data is loaded
raise FileAccessorError(f'Could not find file at {fpath}')
self.fpath = fpath
@staticmethod
def read(fp: Path):
return generate_file_accessor(fp)
class TifSingleSeriesFileAccessor(GenericImageFileAccessor):
def __init__(self, fpath: Path):
super().__init__(fpath)
......
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