diff --git a/gui/widgets/matRad_DVHStatsWidget.m b/gui/widgets/matRad_DVHStatsWidget.m index 6b78a8080..8ad30309b 100644 --- a/gui/widgets/matRad_DVHStatsWidget.m +++ b/gui/widgets/matRad_DVHStatsWidget.m @@ -12,9 +12,15 @@ end methods - function this = matRad_DVHStatsWidget(handleParent) + function this = matRad_DVHStatsWidget(varargin) + + p = inputParser; + p.addOptional('handleParent',[], @ishandle); + p.addParameter('SelectedCube','physicalDose', @ischar); + p.parse(varargin{:}); + matRad_cfg = MatRad_Config.instance(); - if nargin < 1 + if isempty(p.Results.handleParent) handleParent = figure(... 'Units','normalized',... 'Position',[0.005 0.05 0.495 0.9],... @@ -31,6 +37,10 @@ end this = this@matRad_Widget(handleParent); + this.SelectedCube = p.Results.SelectedCube; + this.dvhWidgetHandle.SelectedCube = this.SelectedCube; + this.statWidgetHandle.SelectedCube = this.SelectedCube; + this.showDVHstat(); end function this=update(this,evt) @@ -83,5 +93,10 @@ this.createHandles(); end + + function this = showDVHstat(this) + this.dvhWidgetHandle.showDVH(); + this.statWidgetHandle.showStatistics(); + end end end \ No newline at end of file diff --git a/gui/widgets/matRad_DVHWidget.m b/gui/widgets/matRad_DVHWidget.m index 861dd8376..7dec1f20a 100644 --- a/gui/widgets/matRad_DVHWidget.m +++ b/gui/widgets/matRad_DVHWidget.m @@ -9,8 +9,15 @@ end methods - function this = matRad_DVHWidget(handleParent) - if nargin < 1 + function this = matRad_DVHWidget(varargin) + + p = inputParser; + p.addOptional('handleParent',[], @ishandle); + p.addParameter('SelectedCube','physicalDose', @ischar); + p.parse(varargin{:}); + + + if isempty(p.Results.handleParent) handleParent = figure(... 'Units','normalized',... 'Position',[0.005 0.5 0.495 0.45],... @@ -24,14 +31,17 @@ 'HandleVisibility','callback',... 'Tag','figure1',... 'PaperSize',[20.99999864 29.69999902]); + else + handleParent = p.Results.handleParent; end this = this@matRad_Widget(handleParent); + this.SelectedCube = p.Results.SelectedCube; - if evalin('base','exist(''resultGUI'')') - this.showDVH(); - end +% if evalin('base','exist(''resultGUI'')') +% this.showDVH(); +% end end function this=initialize(this) @@ -96,8 +106,9 @@ function showDVH(this) end dvh = matRad_calcDVH(cst,doseCube,'cum'); - matRad_showDVH(axes(this.widgetHandle),dvh,cst,pln); + title(this.SelectedCube); +% this.widgetHandle.Title = this.SelectedCube; end diff --git a/gui/widgets/matRad_StatisticsWidget.m b/gui/widgets/matRad_StatisticsWidget.m index ac9954715..26361912c 100644 --- a/gui/widgets/matRad_StatisticsWidget.m +++ b/gui/widgets/matRad_StatisticsWidget.m @@ -9,8 +9,14 @@ end methods - function this = matRad_StatisticsWidget(handleParent) - if nargin < 1 + function this = matRad_StatisticsWidget(varargin) + + p = inputParser; + p.addOptional('handleParent',[], @ishandle); + p.addParameter('SelectedCube','physicalDose', @ischar); + p.parse(varargin{:}); + + if isempty(p.Results.handleParent) handleParent = figure(... 'Units','normalized',... 'Position',[0.005 0.05 0.495 0.45],... @@ -24,10 +30,13 @@ 'HandleVisibility','callback',... 'Tag','figure1',... 'PaperSize',[20.99999864 29.69999902]); + else + handleParent = p.Results.handleParent; end this = this@matRad_Widget(handleParent); + this.SelectedCube = p.Results.SelectedCube; end diff --git a/gui/widgets/matRad_VisualizationWidget.m b/gui/widgets/matRad_VisualizationWidget.m index 93859fbed..3842d703d 100644 --- a/gui/widgets/matRad_VisualizationWidget.m +++ b/gui/widgets/matRad_VisualizationWidget.m @@ -739,7 +739,7 @@ function popupProfileType_Callback(this, hObject, event) % 52 Callback function btnDVH_Callback(this, hObject, event) - matRad_DVHStatsWidget(); + matRad_DVHStatsWidget('SelectedCube',this.viewingWidgetHandle.SelectedDisplayOption); % pass fieldname in resultGUI end %H55 Callback