How about `np.where(vol > thres, 1, 0)`? If it's binary why use uint8 and not bool?