binarize ========================================== .. py:function:: petpal.preproc.segmentation_tools.binarize(input_image_numpy: numpy.ndarray, out_val: float = 1) Convert a segmentation image array into a mask by setting nonzero values to a uniform output value, typically one. :param input_image_numpy: Input image to be binarized to zero and another value. :type input_image_numpy: np.ndarray :param out_val: Uniform value output image is set to. :type out_val: float :returns: *bin_mask (np.ndarray)* -- Image array of same shape as input, with values only zero and ``out_val``.