pet2dose.asv 976 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. function tumorPresc = pet2dose(petFileName,map)
  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. PET = am2geom(petFileName);
  12. TDP = open_presc('C:\Documents and Settings\Steve\Desktop\optNew\linlsqOpt\input\uniformPresc\TumorDosePlus.bin');
  13. TDPfull = full3D(TDP);
  14. TDPbinary = single(~~TDPfull);
  15. PETcorrected = PET.data.*TDPbinary;
  16. PETsparse = sparse3D(PETcorrected);
  17. for i=1:PETsparse.Nind;
  18. if(m==1)
  19. PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814);
  20. elseif(m==2)
  21. PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814)^(.5);
  22. elseif(m==3)
  23. PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814)^2;
  24. elseif(m==4)
  25. PETsparse.non_zero_values(i)=100.+30.*exp(-30.*exp(-(PETsparse.non_zero_values(i)./0.0372814-0.25)));
  26. end
  27. end
  28. tumorPresc = PETsparse;
  29. end