matRad function that plots all gantry angles projected to the coplanar plane if current view is axial view call matRad_plotProjectedGantryAngles(axesHandle,pln,ct,plane) input axesHandle: handle to the axis where the plot shouldd appear pln: matRad pln struct ct: matRad ct struct plane: current view plane output - References - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2019 the matRad development team. This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function matRad_plotProjectedGantryAngles(axesHandle,pln,ct,plane) 0002 % matRad function that plots all gantry angles 0003 % projected to the coplanar plane if current view is axial view 0004 % 0005 % call 0006 % matRad_plotProjectedGantryAngles(axesHandle,pln,ct,plane) 0007 % 0008 % input 0009 % axesHandle: handle to the axis where the plot shouldd appear 0010 % pln: matRad pln struct 0011 % ct: matRad ct struct 0012 % plane: current view plane 0013 % 0014 % output 0015 % - 0016 % 0017 % References 0018 % - 0019 % 0020 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0021 % 0022 % Copyright 2019 the matRad development team. 0023 % 0024 % This file is part of the matRad project. It is subject to the license 0025 % terms in the LICENSE file found in the top-level directory of this 0026 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part 0027 % of the matRad project, including this file, may be copied, modified, 0028 % propagated, or distributed except according to the terms contained in the 0029 % LICENSE file. 0030 % 0031 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0032 0033 % show only in axial plane 0034 if plane == 3 0035 0036 meanIsoCenter = mean(pln.propStf.isoCenter,1); 0037 0038 xOffset = meanIsoCenter(1)/ct.resolution.x; 0039 yOffset = meanIsoCenter(2)/ct.resolution.y; 0040 0041 % find radius of inner circle from isocenter 0042 r = 0.8*min([abs([1 ct.cubeDim(1)]-xOffset) abs([1 ct.cubeDim(2)]-yOffset)]); 0043 0044 % coordinates of circle 0045 x = r*cosd(0:360)+xOffset; 0046 y = r*sind(0:360)+yOffset; 0047 0048 gantryAngleVisColor = 'w'; 0049 0050 plot(axesHandle,x,y,'LineWidth',1,'Color',gantryAngleVisColor) 0051 0052 % add text 0053 txt = '180°'; 0054 text(axesHandle,1.1*r*sind(0)+xOffset,1.1*r*cosd(0)+yOffset,txt,'Color',gantryAngleVisColor) 0055 txt = '90°'; 0056 text(axesHandle,1.1*r*sind(90)+xOffset,1.1*r*cosd(90)+yOffset,txt,'Color',gantryAngleVisColor) 0057 txt = '0°'; 0058 text(axesHandle,1.1*r*sind(180)+xOffset,1.1*r*cosd(180)+yOffset,txt,'Color',gantryAngleVisColor) 0059 txt = '270°'; 0060 text(axesHandle,1.22*r*sind(270)+xOffset,1.22*r*cosd(270)+yOffset,txt,'Color',gantryAngleVisColor) 0061 0062 % plot gantry angles 0063 for i = 1:numel(pln.propStf.gantryAngles) 0064 plot(axesHandle,[0 r*sind(180-pln.propStf.gantryAngles(i))]+xOffset,[0 r*cosd(180-pln.propStf.gantryAngles(i))]+yOffset,'LineWidth',1,'Color',gantryAngleVisColor) 0065 end 0066 0067 end