Skip to content

Commit

Permalink
fix: correctly check if time dim is needed in preComputedMinMaxValues
Browse files Browse the repository at this point in the history
  • Loading branch information
ElpadoCan committed Nov 20, 2024
1 parent 058560f commit 4395b6e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cellacdc/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -6313,9 +6313,13 @@ def preComputedMinMaxValues(self, data: dict):
self.minMaxValuesMapper = {}
for pos_i, posData in enumerate(data):
img_data = posData.img_data
if posData.img_data.ndim == 2:
requires_time_dim = (
posData.img_data.ndim == 2
or (posData.img_data.ndim == 3 and posData.SizeZ > 1)
)
if requires_time_dim:
img_data = (img_data,)

for frame_i, image in enumerate(img_data):
if image.ndim == 2:
image = (image,)
Expand Down

0 comments on commit 4395b6e

Please sign in to comment.