Skip to content

Commit

Permalink
Load downsampled stack into napari viewer
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Jan 19, 2024
1 parent b5f6738 commit 830253a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion mesospim_stitcher/stitching_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import dask.array as da
import h5py
import numpy as np
from brainglobe_utils.qtpy.logo import header_widget
from napari.utils.notifications import show_warning
from napari.viewer import Viewer
Expand All @@ -17,6 +18,14 @@

from mesospim_stitcher.file_utils import check_mesospim_directory

DOWNSAMPLE_ARRAY = np.array(
[[1, 1, 1], [2, 2, 2], [4, 4, 4], [8, 8, 8], [16, 16, 16]]
)

SUBDIVISION_ARRAY = np.array(
[[32, 32, 16], [32, 32, 16], [32, 32, 16], [32, 32, 16], [32, 32, 16]]
)


class StitchingWidget(QWidget):
def __init__(self, napari_viewer: Viewer):
Expand Down Expand Up @@ -88,7 +97,7 @@ def _on_add_tiles_button_clicked(self):
tile_group = self.h5_file["t00000"]

for child in tile_group:
curr_tile = da.from_array(tile_group[f"{child}/0/cells"])
curr_tile = da.from_array(tile_group[f"{child}/2/cells"])
self.tiles.append(curr_tile)
print("Adding tile to napari")
self._viewer.add_image(
Expand Down

0 comments on commit 830253a

Please sign in to comment.