Skip to content

Commit

Permalink
Fix _reader.py for multiple channels (D,C,H,W)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-vdl authored May 2, 2023
1 parent 4ebdfc1 commit d48e317
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/napari_cell_centroid_annotator/_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ def img_reader_function(path):
raise ValueError("File must be a tiff file")

data = tifffile.imread(path)
ndim = data.ndim

# optional kwargs for the corresponding viewer.add_* method
add_kwargs = {
"name": path.stem,
"colormap": "gray",
"blending": "additive",
"order": (1, 0, 2, 3) if ndim == 4 else (0, 1, 2)
}

layer_type = "image" # optional, default is "image"
Expand Down

0 comments on commit d48e317

Please sign in to comment.