function tumorPresc = pet2dose(petFileName,m) % if(map=='linear') % m=1; % elseif(map=='root') % m=2; % elseif(map=='quad') % m=3; % elseif(map=='gomp') % m=4; % end % PET = am2geom(petFileName); TDP = open_presc('C:\Documents and Settings\Steve\My Documents\Research\optNew\linlsqOpt\input\HN003uniPrescVolNew\PTV70plus.bin'); TDPfull = full3D(TDP); TDPbinary = single(~~TDPfull); PETcorrected = PET.data.*TDPbinary; PETsparse = sparse3D(PETcorrected); for i=1:PETsparse.Nind; if(PETsparse.non_zero_values(i)<0) PETsparse.non_zero_values(i)=0; end if(m==1) PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814); elseif(m==2) PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814)^(.5); elseif(m==3) PETsparse.non_zero_values(i)=100.+30.*(PETsparse.non_zero_values(i)./0.0372814)^2; elseif(m==4) PETsparse.non_zero_values(i)=100.+30.*exp(-15.*exp(-15.*(PETsparse.non_zero_values(i)./0.0376729-0.1))); end end tumorPresc = PETsparse;