Skip to content
This repository has been archived by the owner on Nov 26, 2023. It is now read-only.

Commit

Permalink
loading multipage tifs in a project
Browse files Browse the repository at this point in the history
  • Loading branch information
kushalkolar committed Mar 25, 2021
1 parent fdba1df commit a5545f5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mesmerize/viewer/core/viewer_work_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,13 @@ def from_pickle(cls, pickle_file_path: str, tiff_path: str = None):
if tiff_path is not None:
# seq = tifffile.imread(tiff_path)
tif = tifffile.TiffFile(tiff_path, is_nih=True)
seq = tif.asarray(maxworkers=int(get_sys_config()['_MESMERIZE_N_THREADS']))
if len(tif.series) > 1:
seq = tif.asarray(
key=range(0, len(tif.series)),
maxworkers=int(get_sys_config()['_MESMERIZE_N_THREADS'])
)
else:
seq = tif.asarray(maxworkers=int(get_sys_config()['_MESMERIZE_N_THREADS']))
if seq.ndim == 4:
# tzxy to xytz
seq = np.moveaxis(seq, (0, 1, 2, 3), (2, 3, 0, 1))
Expand Down

0 comments on commit a5545f5

Please sign in to comment.