itasc.cellpose.joint¶
Joint nucleus-anchored cell segmentation + tracking, Qt-free.
When the standalone tool has both channels, this composes the existing pieces into one nucleus-anchored path:
Nucleus native masks (
native_masks.run_nucleus_masks_stack()) → track them (track_laptrack.track_masks()) → tracked nucleus labels.Cell flows (
cellpose_runner.run_cell_stack()→prob,dp); the cell foreground issigmoid(prob) > fg_threshold.Per z-plane, flow-follow each cell-foreground pixel to a nucleus (
flow_following.flow_follow_movie()). Cell labels inherit the tracked nucleus ids, so the cell stack is tracked by construction — one cell per nucleus, sharing its id.
Everything here reuses functions the app also imports (read-only); it adds no new behaviour to the app’s Cellpose stage.
Functions
|
Boolean cell foreground from a Cellpose probability map via the sigmoid. |
|
Run the joint path; return |
- itasc.cellpose.joint.cell_foreground_from_prob(prob, threshold)[source]¶
Boolean cell foreground from a Cellpose probability map via the sigmoid.
Matches the app’s
sigmoid(prob)foreground convention;thresholdis the exposed cutoff on the[0, 1]sigmoid.
- itasc.cellpose.joint.joint_segment_track(nucleus_stack, cell_stack, nucleus_params, cell_params, flow_params, *, max_distance=15.0, max_frame_gap=0, progress_cb=None, cancel_cb=None)[source]¶
Run the joint path; return
(nucleus_tracked, cell_tracked)(T,Z,Y,X).Both outputs are
int32and share label ids: a cell carries the id of the nucleus it was assigned to.max_distance/max_frame_gaptune the nucleus tracker; the cell stack inherits its tracks.- Return type:
- Parameters:
nucleus_stack (ndarray)
cell_stack (ndarray)
nucleus_params (NucleusParams)
cell_params (CellParams)
flow_params (FlowFollowingParams)
max_distance (float)
max_frame_gap (int)