File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,3 +118,4 @@ docs/api/*
118118docs /_build /*
119119cover /*
120120MANIFEST
121+ AGENTS.md
Original file line number Diff line number Diff line change @@ -69,6 +69,13 @@ def cellpose_detector(
6969 ... optional_channel=0
7070 ... )
7171 """
72+
73+ dims = imageplus .getDimensions ()
74+ cal = imageplus .getCalibration ()
75+
76+ if imageplus .getNSlices () > 1 :
77+ imageplus .setDimensions (dims [2 ], dims [4 ], dims [3 ])
78+
7279 settings = Settings (imageplus )
7380
7481 settings .detectorFactory = CellposeDetectorFactory ()
@@ -94,10 +101,12 @@ def cellpose_detector(
94101 return
95102
96103 settings .detectorSettings ["CELLPOSE_MODEL" ] = selected_model
97- settings .detectorSettings ["CELL_DIAMETER" ] = obj_diameter
104+ settings .detectorSettings ["CELL_DIAMETER" ] = Double ( obj_diameter )
98105 settings .detectorSettings ["USE_GPU" ] = use_gpu
99106 settings .detectorSettings ["SIMPLIFY_CONTOURS" ] = simplify_contours
100107
108+ imageplus .setDimensions (dims [2 ], dims [3 ], dims [4 ])
109+
101110 return settings
102111
103112
You can’t perform that action at this time.
0 commit comments