Skip to content

Commit a54cb48

Browse files
bug in 3d running
1 parent 6f1e4ef commit a54cb48

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

cellpose/gui/gui.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2056,9 +2056,12 @@ def compute_segmentation(self, custom=False, model_name=None, load_model=True):
20562056
do_3D = False if stitch_threshold > 0. else do_3D
20572057

20582058
if self.restore == "filter":
2059-
data = self.stack_filtered.copy().squeeze(axis=0)
2059+
data = self.stack_filtered.copy()
20602060
else:
2061-
data = self.stack.copy().squeeze(axis=0)
2061+
data = self.stack.copy()
2062+
2063+
if self.NZ == 1:
2064+
data = data.squeeze(axis=0)
20622065

20632066
flow_threshold = self.segmentation_settings.flow_threshold
20642067
cellprob_threshold = self.segmentation_settings.cellprob_threshold

0 commit comments

Comments
 (0)