pet2dose.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. function tumorPresc = pet2dose(petFileName,m)
  2. % if(map=='linear')
  3. % m=1;
  4. % elseif(map=='root')
  5. % m=2;
  6. % elseif(map=='quad')
  7. % m=3;
  8. % elseif(map=='gomp')
  9. % m=4;
  10. % end
  11. %
  12. PET = am2geom(petFileName);
  13. TDP = open_presc('C:\Documents and Settings\Steve\My Documents\Research\optNew\linlsqOpt\input\HN003uniPrescVolNew\PTV70dosePlus.bin');
  14. TDPfull = full3D(TDP);
  15. TDPbinary = single(~~TDPfull);
  16. PETcorrected = PET.data.*TDPbinary;
  17. PETsparse = sparse3D(PETcorrected);
  18. for i=1:PETsparse.Nind;
  19. if(PETsparse.non_zero_values(i)<0)
  20. PETsparse.non_zero_values(i)=0;
  21. end
  22. if(m==1)
  23. PETsparse.non_zero_values(i)=70.+30./100*70*(PETsparse.non_zero_values(i)./0.00506392);
  24. elseif(m==2)
  25. PETsparse.non_zero_values(i)=70.+30./100*70*(PETsparse.non_zero_values(i)./0.00506392)^(.5);
  26. elseif(m==3)
  27. PETsparse.non_zero_values(i)=70.+30./100*70*(PETsparse.non_zero_values(i)./0.00506392)^2;
  28. elseif(m==4)
  29. PETsparse.non_zero_values(i)=70.+30./100*70*exp(-15.*exp(-15.*(PETsparse.non_zero_values(i)./0.00506392-0.1)));
  30. end
  31. end
  32. tumorPresc = PETsparse;