merge_beamlets.m 388 B

1234567891011121314151617
  1. function B = merge_beamlets(num_batches, pat_dir)
  2. % num_batches = 4;
  3. B = [];
  4. for k = 1:num_batches
  5. batch_doses = read_ryan_beamlets([pat_dir, '\batch_dose' num2str(k-1) '.bin']);
  6. B = [B batch_doses];
  7. end
  8. for k = 1:numel(B)
  9. B{k}.num = k-1;
  10. end
  11. write_ryan_beamlets([pat_dir '\batch_dose.bin'],B);
  12. write_ryan_beamlets([pat_dir '\batch_dose_backup.bin'],B);