code: def load_slices(dcm_dir):
      """
      Load dcm like images
      Return img array and [z,y,x]-ordered origin and spacing
      """
  
      dcm_list = [join_paths(dcm_dir, i) for i in os.listdir(dcm_dir)]
      indices = np.array(
          [pydicom.dcmread(i).InstanceNumber for i in dcm_list]
      )
      dcm_list = np.array(dcm_list)[indices.argsort()]
  
      itkimage = sitk.ReadImage(dcm_list)
      numpyImage = sitk.GetArrayFromImage(itkimage)
  
      numpyOrigin = np.array(list(reversed(itkimage.GetOrigin())))
      numpySpacing = np.array(list(reversed(itkimage.GetSpacing())))
  
      return numpyImage, numpyOrigin, numpySpacing
  
file_path: PaddleSeg/contrib/MedicalSeg/tools/preprocess_utils/load_image.py
imports: import os
  import sys
  import nibabel
  import pydicom
  import SimpleITK
  import tools.preprocess_utils.global_var
  from tools.preprocess_utils.path_utils import join_paths
label_desc: Use image node_id 1 for calling a global function with example usage: load_slices(dcm_dir) and returns: numpyImage,  numpyOrigin,  numpySpacing