Runs segmentation via a registered backend ("totalsegmentator", "nnunet",
"vista3d", "medsam2", or custom registered backends), aligns the mask to
the reference dicom_volume, and optionally computes voxel-wise Shannon
entropy uncertainty and Dice agreement.
Usage
ai_segment(
vol,
backend = "totalsegmentator",
prompts = NULL,
estimate_uncertainty = TRUE,
reference_seg = NULL
)Arguments
- vol
A
dicom_volumeobject or path to a DICOM file/directory.- backend
Registered segmentation backend name.
- prompts
Optional prompt list for interactive models such as
"medsam2"(e.g.,list(points = matrix(c(r, c, s), ncol = 3))).- estimate_uncertainty
Logical. Compute voxel-wise entropy map (
TRUEby default).- reference_seg
Optional reference
dicom_segfor Dice evaluation.
