I have a project where we segmented 500 tumors from 50 patients and into a single segmentation with 1 segment per tumor.
I want to generate a probability map by adding all 500 lesions into a binary file, then divide it by the number of subjects.
Is there a way to bulk export every segment to a binary labelmap with a value of 1 (or 0)?
Or alternatively is there a way to bulk add segments into a single layer without overlaps but summed intensity values?
Thanks Csaba! It doesn’t seem to work on Mac. The solution was to export each segmentation layer individually (which was tedious but doable with only 6 layers.
I turned on show Segment layer on the Segment viewer
Exported each layer’s segments to a separate binary label map
SimpleITK filters was used to binarize them (0 vs. 1)
Added binary maps to each other
Converted the summed map to a FLOAT (Cast Scalar module)
Divided by the number of patients (created a labelmap whose entire value was the equivalent of the number of patients using BinaryImage Threshold filter in Simple ITK filters)
Voila the result is a population lesion probability map.