original_docstring: 
      Transfer coordinates in mm into voxel's location
  
      Args:
          coord (scalar | list[scalar]): coordinates in mm (real-world point).
          meta (src.preprocess.load_ct.MetaData): meta information of the CT scan.
  
      Returns:
          list[int]: the voxel location related to the coord.
      
docstring: Transfer coordinates in mm into voxel's location
docstring_tokens: Transfer coordinates in mm into voxel ' s location
code: def mm_coordinates_to_voxel(coord, meta):
      """
      Transfer coordinates in mm into voxel's location
  
      Args:
          coord (scalar | list[scalar]): coordinates in mm (real-world point).
          meta (src.preprocess.load_ct.MetaData): meta information of the CT scan.
  
      Returns:
          list[int]: the voxel location related to the coord.
      """
  
      if np.isscalar(coord):
          coord = [coord]
  
      coord = np.array(coord)
      origin = scipy.ndimage._ni_support._normalize_sequence(meta.origin, len(coord))
      spacing = scipy.ndimage._ni_support._normalize_sequence(meta.spacing, len(coord))
  
      # N-dimensional array coordinates for the point in real world should be computed in the way below:
      coord = np.rint((coord - np.array(origin)) / np.array(spacing))
  
      return coord.astype(np.int)
code_tokens: def mm_coordinates_to_voxel ( coord , meta ) : if np . isscalar ( coord ) : coord = [ coord ] coord = np . array ( coord ) origin = scipy . ndimage . _ni_support . _normalize_sequence ( meta . origin , len ( coord ) ) spacing = scipy . ndimage . _ni_support . _normalize_sequence ( meta . spacing , len ( coord ) ) coord = np . rint ( ( coord - np . array ( origin ) ) / np . array ( spacing ) ) return coord . astype ( np . int )
short_docstring: Transfer coordinates in mm into voxel's location
short_docstring_tokens: Transfer coordinates in mm into voxel ' s location
comment: """
      Transfer coordinates in mm into voxel's location
  
      Args:
          coord (scalar | list[scalar]): coordinates in mm (real-world point).
          meta (src.preprocess.load_ct.MetaData): meta information of the CT scan.
  
      Returns:
          list[int]: the voxel location related to the coord.
      """$SEP$# N-dimensional array coordinates for the point in real world should be computed in the way below: