| 
26 | 26 |         airOffsetCorrection  = true;    % Corrects WEPL for SSD difference to kernel database  | 
27 | 27 |         lateralModel = 'auto';          % Lateral Model used. 'auto' uses the most accurate model available (i.e. multiple Gaussians). 'single','double','multi' try to force a singleGaussian or doubleGaussian model, if available  | 
28 | 28 | 
 
  | 
29 |  | -        cutOffMethod = 'integral'; % or 'relative'  | 
 | 29 | +        cutOffMethod = 'integral';      % or 'relative' - describes how to calculate the lateral dosimetric cutoff  | 
30 | 30 | 
 
  | 
31 | 31 |         visBoolLateralCutOff = false;   % Boolean switch for visualization during+ LeteralCutOff calculation  | 
32 | 32 |     end  | 
@@ -714,27 +714,26 @@ function calcLateralParticleCutOff(this,cutOffLevel,stfElement)  | 
714 | 714 | 
 
  | 
715 | 715 |                         % Find radius at which integrated dose becomes  | 
716 | 716 |                         % bigger than cutoff * IDD  | 
717 |  | -                        if strcmp(this.cutOffMethod, 'integral')  | 
718 |  | -                            IX = find(cumArea >= idd(j) * cutOffLevel,1, 'first');  | 
719 |  | -                            this.machine.data(energyIx).LatCutOff.CompFac = cutOffLevel^-1;  | 
720 |  | -                        elseif strcmp(this.cutOffMethod, 'relative')  | 
721 |  | -                            IX = find(dose_r <= (1-cutOffLevel) * max(dose_r), 1, 'first');  | 
722 |  | -                            relFac = cumArea(IX)./cumArea(end); % (or idd(j)) to find the appropriate integral of dose  | 
723 |  | -                            this.machine.data(energyIx).LatCutOff.CompFac = relFac^-1;  | 
724 |  | -                        else  | 
725 |  | -                            matRad_cfg = MatRad_Config.instance();  | 
726 |  | -                            matRad_cfg.dispError('Invalid Cutoff Method');  | 
 | 717 | +                        switch this.cutOffMethod  | 
 | 718 | +                            case 'integral'  | 
 | 719 | +                                IX = find(cumArea >= idd(j) * cutOffLevel,1, 'first');  | 
 | 720 | +                                this.machine.data(energyIx).LatCutOff.CompFac = cutOffLevel^-1;  | 
 | 721 | +                            case 'relative'  | 
 | 722 | +                                IX = find(dose_r <= (1-cutOffLevel) * max(dose_r), 1, 'first');  | 
 | 723 | +                                relFac = cumArea(IX)./cumArea(end); % (or idd(j)) to find the appropriate integral of dose  | 
 | 724 | +                                this.machine.data(energyIx).LatCutOff.CompFac = relFac^-1;  | 
 | 725 | +                            otherwise  | 
 | 726 | +                                matRad_cfg.dispError('LateralParticleCutOff: Invalid Cutoff Method. Must be ''integral'' or ''relative''!');  | 
727 | 727 |                         end  | 
728 | 728 | 
 
  | 
729 | 729 |                         if isempty(IX)  | 
730 | 730 |                             depthDoseCutOff = Inf;  | 
731 |  | -                            matRad_cfg.dispWarning('LateralParticleCutOff: Couldnt find lateral cut off !')  | 
 | 731 | +                            matRad_cfg.dispWarning('LateralParticleCutOff: Couldnt find lateral cut off!')  | 
732 | 732 |                         elseif isnumeric(IX)  | 
733 | 733 |                             depthDoseCutOff = r_mid(IX);  | 
734 | 734 |                         end  | 
735 | 735 | 
 
  | 
736 | 736 |                         this.machine.data(energyIx).LatCutOff.CutOff(j) = depthDoseCutOff;  | 
737 |  | - | 
738 | 737 |                     end  | 
739 | 738 |                 end  | 
740 | 739 |             end  | 
 | 
0 commit comments