original_docstring: convert nii.gz file to numpy array in the right directory
docstring: convert nii.gz file to numpy array in the right directory
docstring_tokens: convert nii . gz file to numpy array in the right directory
code: def convert_path(self):
          """convert nii.gz file to numpy array in the right directory"""
          import pdb
          pdb.set_trace()
  
          print("Start convert images to numpy array, please wait patiently")
          self.load_save(
              self.image_dir,
              load_type=np.float32,
              savepath=self.image_path,
              preprocess=[
                  HU2float32,
                  functools.partial(resample, new_shape=[128, 128, 128])
              ])
          print("start convert labels to numpy array, please wait patiently")
  
          self.load_save(
              self.label_dir,
              np.float32,
              self.label_path,
              preprocess=[
                  functools.partial(
                      resample, new_shape=[128, 128, 128], order=0)
              ],
              tag="label")
code_tokens: def convert_path ( self ) : import pdb pdb . set_trace ( ) print ( "Start convert images to numpy array, please wait patiently" ) self . load_save ( self . image_dir , load_type = np . float32 , savepath = self . image_path , preprocess = [ HU2float32 , functools . partial ( resample , new_shape = [ 128 , 128 , 128 ] ) ] ) print ( "start convert labels to numpy array, please wait patiently" ) self . load_save ( self . label_dir , np . float32 , self . label_path , preprocess = [ functools . partial ( resample , new_shape = [ 128 , 128 , 128 ] , order = 0 ) ] , tag = "label" )
short_docstring: convert nii.gz file to numpy array in the right directory
short_docstring_tokens: convert nii . gz file to numpy array in the right directory
comment: """convert nii.gz file to numpy array in the right directory"""