code: def to_sdf(self):
          
          # compute medial axis transform
          skel, sdf_in = morph.medial_axis(self.data, return_distance=True)
          useless_skel, sdf_out = morph.medial_axis(
              np.iinfo(np.uint8).max - self.data, return_distance=True)
  
          # convert to true sdf
          sdf = sdf_out - sdf_in
          return sdf
docs: Converts the 2D image to a 2D signed distance field.
  
          Returns
          -------
          :obj:`numpy.ndarray`
              2D float array of the signed distance field