Resegmenter#
- class zrad.preprocessing.resegmentation.Resegmenter(intensity_range=None, outlier_range=None)[source]#
Apply range and outlier re-segmentation to
RoiData.intensity_mask.Re-segmentation removes voxels from the intensity ROI by replacing excluded voxels with
NaNand clearing prepared texture and IVH images. Range re-segmentation is evaluated onRoiData.imageand applied to the existingRoiData.intensity_mask. If both criteria are configured, range re-segmentation is applied first; outlier statistics are then calculated from the remaining valid intensity-mask values.- Parameters:
intensity_range (tuple[float, float] or None, optional) – Inclusive lower and upper intensity limits as
(lower, upper). IfNone, range re-segmentation is skipped.outlier_range (float, str, or None, optional) – Number of standard deviations around the ROI mean to retain. If
Noneis supplied, outlier re-segmentation is skipped.
Methods
|
Return ROI data with an updated intensity mask. |
Return re-segmentation parameters mapped to their configured values. |
- Resegmenter.apply(roi_data)[source]#
Return ROI data with an updated intensity mask.
- Parameters:
roi_data (RoiData) – ROI data containing
image,morphological_mask, andintensity_mask. The intensity mask is usually created withIntensityMaskBuilderbefore re-segmentation.- Returns:
roi_data – New ROI data with
intensity_maskupdated by the configured range and outlier criteria.- Return type: