code: def points_to_indices(points, pitch, origin):
      
      points = np.asanyarray(points, dtype=np.float64)
      origin = np.asanyarray(origin, dtype=np.float64)
      pitch = float(pitch)
  
      if points.shape != (points.shape[0], 3):
          raise ValueError('shape of points must be (q, 3)')
  
      if origin.shape != (3,):
          raise ValueError('shape of origin must be (3,)')
  
      indices = np.round((points - origin) / pitch).astype(int)
      return indices
docs: Convert center points of an (n,m,p) matrix into its indices.
  
      Parameters
      ----------
      points: (q, 3) float, center points of voxel matrix (n,m,p)
      pitch: float, what pitch was the voxel matrix computed with
      origin: (3,) float, what is the origin of the voxel matrix
  
      Returns
      ----------
      indices: (q, 3) int, list of indices