segmentations_merge ===================================================== .. py:function:: petpal.preproc.segmentation_tools.segmentations_merge(segmentation_primary: numpy.ndarray, segmentation_secondary: numpy.ndarray, regions: list) -> numpy.ndarray Merge segmentations by assigning regions to a primary segmentation image from a secondary segmentation. Region indices are pulled from the secondary into the primary from a list. Primary and secondary segmentations must have the same shape and orientation. :param segmentation_primary: The main segmentation to which new regions will be added. :type segmentation_primary: np.ndarray :param segmentation_secondary: Distinct segmentation with regions to add to the primary. :type segmentation_secondary: np.ndarray :param regions: List of regions to pull from the secondary to add to the primary. :type regions: list :returns: *segmentation_primary (np.ndarray)* -- The input segmentation with new regions added.