|
57 | 57 |
|
58 | 58 | matRad_cfg = MatRad_Config.instance(); |
59 | 59 |
|
| 60 | +colorSpec = {'Color',matRad_cfg.gui.elementColor,... |
| 61 | + 'XColor',matRad_cfg.gui.textColor,... |
| 62 | + 'YColor',matRad_cfg.gui.textColor,... |
| 63 | + 'GridColor',matRad_cfg.gui.textColor,... |
| 64 | + 'MinorGridColor',matRad_cfg.gui.backgroundColor}; |
| 65 | + |
60 | 66 | %% check if cubes consistent |
61 | 67 | if ~isequal(size(cube1),size(cube2)) |
62 | 68 | matRad_cfg.dispError('dose cubes must be the same size\n'); |
|
159 | 165 | matRad_cfg.dispInfo('Plotting %s plane...\n',planename{plane}); |
160 | 166 |
|
161 | 167 | % Initialize Figure |
162 | | - hfig.(planename{plane}).('fig') = figure('Renderer', 'painters', 'Position', [10 50 800 800]); |
163 | | - set(gcf,'Color',[1 1 1]); |
| 168 | + hfig.(planename{plane}).('fig') = figure('Position', [10 50 800 800],'Color',matRad_cfg.gui.backgroundColor); |
164 | 169 |
|
165 | 170 | % Plot Dose 1 |
166 | | - hfig.(planename{plane}).('cube1').Axes = subplot(2,2,1); |
| 171 | + hfig.(planename{plane}).('cube1').Axes = subplot(2,2,1,colorSpec{:}); |
167 | 172 | [hfig.(planename{plane}).('cube1').CMap,... |
168 | 173 | hfig.(planename{plane}).('cube1').Dose,... |
169 | 174 | hfig.(planename{plane}).('cube1').Ct,... |
|
172 | 177 | matRad_plotSliceWrapper(gca,ct,cstHandle,1,cube1,plane,slicename{plane},[],[],colorcube,jet,doseWindow,[],100); |
173 | 178 |
|
174 | 179 | % Plot Dose 2 |
175 | | - hfig.(planename{plane}).('cube2').Axes = subplot(2,2,2); |
| 180 | + hfig.(planename{plane}).('cube2').Axes = subplot(2,2,2,colorSpec{:}); |
176 | 181 | [hfig.(planename{plane}).('cube2').CMap,... |
177 | 182 | hfig.(planename{plane}).('cube2').Dose,... |
178 | 183 | hfig.(planename{plane}).('cube2').Ct,... |
|
181 | 186 | matRad_plotSliceWrapper(gca,ct,cstHandle,1,cube2,plane,slicename{plane},[],[],colorcube,jet,doseWindow,[],100); |
182 | 187 |
|
183 | 188 | % Plot absolute difference |
184 | | - hfig.(planename{plane}).('diff').Axes = subplot(2,2,3); |
| 189 | + hfig.(planename{plane}).('diff').Axes = subplot(2,2,3,colorSpec{:}); |
185 | 190 | [hfig.(planename{plane}).('diff').CMap,... |
186 | 191 | hfig.(planename{plane}).('diff').Dose,... |
187 | 192 | hfig.(planename{plane}).('diff').Ct,... |
|
190 | 195 | matRad_plotSliceWrapper(gca,ct,cstHandle,1,differenceCube,plane,slicename{plane},[],[],colorcube,diffCMap,doseDiffWindow,[],100); |
191 | 196 |
|
192 | 197 | % Plot gamma analysis |
193 | | - hfig.(planename{plane}).('gamma').Axes = subplot(2,2,4); |
| 198 | + hfig.(planename{plane}).('gamma').Axes = subplot(2,2,4,colorSpec{:}); |
194 | 199 | gammaCMap = matRad_getColormap('gammaIndex'); |
195 | 200 | [hfig.(planename{plane}).('gamma').CMap,... |
196 | 201 | hfig.(planename{plane}).('gamma').Dose,... |
|
244 | 249 | yLabelString = 'Dose [Gy]'; |
245 | 250 | end |
246 | 251 |
|
247 | | - hfig.profiles.fig = figure('Renderer', 'painters', 'Position', [10 50 800 800]); |
248 | | - set(gcf,'Color',[1 1 1]); |
| 252 | + hfig.profiles.fig = figure('Position', [10 50 800 800],'Color',matRad_cfg.gui.backgroundColor); |
249 | 253 |
|
250 | | - hfig.profiles.x = subplot(2,2,1); |
251 | | - plot(posX,profilex{1},'r') |
| 254 | + hfig.profiles.x = subplot(2,2,1,colorSpec{:}); |
| 255 | + plot(hfig.profiles.x,posX,profilex{1},'r') |
252 | 256 | hold on |
253 | | - plot(posX,profilex{2},'r--') |
| 257 | + plot(hfig.profiles.x,posX,profilex{2},'r--') |
254 | 258 | xlabel('X [mm]','FontSize',fontsize) |
255 | 259 | ylabel(yLabelString,'FontSize',fontsize); |
256 | 260 | title('x-Profiles'); |
257 | 261 | legend({'Dose 1','Dose 2'},'Location','southeast') |
258 | 262 | legend boxoff |
259 | 263 |
|
260 | | - hfig.profiles.y = subplot(2,2,2); |
261 | | - plot(posY,profiley{1},'r') |
| 264 | + hfig.profiles.y = subplot(2,2,2,colorSpec{:}); |
| 265 | + plot(hfig.profiles.y,posY,profiley{1},'r') |
262 | 266 | hold on |
263 | | - plot(posY,profiley{2},'r--') |
| 267 | + plot(hfig.profiles.y,posY,profiley{2},'r--') |
264 | 268 | xlabel('Y [mm]','FontSize',fontsize) |
265 | 269 | ylabel(yLabelString,'FontSize',fontsize); |
266 | 270 | title('y-Profiles'); |
267 | 271 | legend({'Dose 1','Dose 2'},'Location','southeast') |
268 | 272 | legend boxoff |
269 | 273 |
|
270 | | - hfig.profiles.z = subplot(2,2,3); |
271 | | - plot(posZ,profilez{1},'r') |
| 274 | + hfig.profiles.z = subplot(2,2,3,colorSpec{:}); |
| 275 | + plot(hfig.profiles.z,posZ,profilez{1},'r') |
272 | 276 | hold on |
273 | | - plot(posZ,profilez{2},'r--') |
| 277 | + plot(hfig.profiles.z,posZ,profilez{2},'r--') |
274 | 278 | xlabel('Z [mm]','FontSize',fontsize) |
275 | 279 | ylabel(yLabelString,'FontSize',fontsize); |
276 | 280 | title('z-Profiles'); |
|
290 | 294 | % Plot DVH |
291 | 295 | matRad_cfg.dispInfo('Plotting DVH...'); |
292 | 296 |
|
293 | | - hfig.dvh.fig = figure('Renderer', 'painters', 'Position', [10 100 1000 700]); |
294 | | - set(gcf,'Color',matRad_cfg.gui.backgroundColor); |
295 | | - matRad_showDVH(dvh1,cst,pln); |
| 297 | + hfig.dvh.fig = figure('Position', [10 100 1000 700],'Color',matRad_cfg.gui.backgroundColor); |
| 298 | + matRad_showDVH(dvh1,cst,pln,'axesHandle',axes(hfig.dvh.fig,colorSpec{:})); |
296 | 299 | hold on |
297 | 300 | matRad_showDVH(dvh2,cst,pln,'axesHandle',gca,'LineStyle','--'); |
298 | 301 | xlim([0 dvhWindow*1.2]) |
|
0 commit comments