Exemple #1
0
 def preprocessing_valid(self):
      self.z_valid = z_calc(self.valid_pat, self.valid_sub_pat)
      self.z_startvalid, self.z_endvalid = calculating_slicesofinterest_segtrain(self.valid_pat, self.valid_sub_pat, self.z_valid, self.roi_interest)
      self.z_startvalid, self.z_endvalid = calculating_slicesofinterestfor3D(self.valid_pat,self.z_startvalid, self.z_endvalid)
      self.x_centvalid, self.y_centvalid = calculate_centroid_segvalid(self.valid_pat,
          self.valid_sub_pat, self.z_startvalid, self.z_endvalid, self.roi_interest)
      np.save(os.path.join(self.main_pred_dir, 'valid.npy'), self.valid_pat)
      np.save(os.path.join(self.main_pred_dir, 'valid_sub.npy'), self.valid_sub_pat)
      np.save(os.path.join(self.main_pred_dir, 'z_valid.npy'), self.z_valid)
      np.save(os.path.join(self.main_pred_dir, 'z_startvalid.npy'), self.z_startvalid)
      np.save(os.path.join(self.main_pred_dir, 'z_endvalid.npy'), self.z_endvalid)
      np.save(os.path.join(self.main_pred_dir, 'x_centvalid.npy'), self.x_centvalid)
      np.save(os.path.join(self.main_pred_dir, 'y_centvalid.npy'), self.y_centvalid)
Exemple #2
0
 def preprocessing_train(self):
      self.z_TRAIN = z_calc(self.train_pat, self.train_pat_sublist)
      self.z_starttrain, self.z_endtrain = calculating_slicesofinterest_segtrain(self.train_pat, self.train_pat_sublist, self.z_TRAIN, self.roi_interest)
      self.z_starttrain, self.z_endtrain = calculating_slicesofinterestfor3D(self.train_pat,self.z_starttrain, self.z_endtrain)
      self.x_centtrain, self.y_centtrain = calculate_centroid_segtrain(self.train_pat,
          self.train_pat_sublist, self.z_starttrain, self.z_endtrain, self.roi_interest)
      np.save(os.path.join(self.main_pred_dir, 'train.npy'), self.train_pat)
      np.save(os.path.join(self.main_pred_dir, 'train_sub.npy'), self.train_pat_sublist)
      np.save(os.path.join(self.main_pred_dir, 'z_train.npy'), self.z_TRAIN)
      np.save(os.path.join(self.main_pred_dir, 'z_starttrain.npy'), self.z_startvalid)
      np.save(os.path.join(self.main_pred_dir, 'z_endtrain.npy'), self.z_endtrain)
      np.save(os.path.join(self.main_pred_dir, 'x_centtrain.npy'), self.x_centtrain)
      np.save(os.path.join(self.main_pred_dir, 'y_centtrain.npy'), self.y_centtrain)