Skip to content

Commit

Permalink
Gamma Widget skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
amitantony committed Oct 27, 2022
1 parent 2d41f12 commit 3fe5660
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 1 deletion.
17 changes: 16 additions & 1 deletion gui/matRad_MainGUI.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
StructureVisibilityWidget
InfoWidget
ViewingWidget
DVHStatsWidget
GammaWidget
eventListeners

matRad_cfg = MatRad_Config.instance();
Expand All @@ -29,7 +31,7 @@
folder = fileparts(mfilename('fullpath'));
loadIcons = load(fullfile(folder,'matRad_iconsGUI.mat'),'icons');
icons = loadIcons.icons;

icons{end+1} = imread('icons8-gamma-16.png');
h60 = uitoolbar(...
'Parent',h1,...
'Tag','uitoolbar1');
Expand Down Expand Up @@ -111,6 +113,15 @@
'ClickedCallback',@(hObject, eventdata)uitoggletool8_ClickedCallback(this, hObject, eventdata),...
'Separator','on',...
'TooltipString','Insert Colorbar' );
h70 = uipushtool(...
'Parent',h60,...
'BusyAction','cancel',...
'Interruptible','off',...
'Tag','gammaWidget',...
'CData',icons{10},...
'ClickedCallback',@(hObject,eventdata)gammaWidget_ClickedCallback(this,hObject,eventdata),...
'Separator','on',...
'TooltipString','Gamma index tool' );

end
end
Expand Down Expand Up @@ -486,6 +497,10 @@ function toolbarLegend_ClickedCallback(this,hObject, eventdata)
%set(this.ViewingWidget.legendHandle,'visible',get(hObject,'State'));
end

function gammaWidget_ClickedCallback(this,hObject,eventdata)
this.GammaWidget = matRad_GammaWidget();
end

function toolbarZoomIn_ClickedCallback(this,hObject, eventdata)
set(this.ViewingWidget.zoomHandle,'Enable',char(get(hObject,'State')));
set(this.ViewingWidget.zoomHandle,'Direction','in');
Expand Down
79 changes: 79 additions & 0 deletions gui/widgets/matRad_GammaWidget.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
classdef matRad_GammaWidget < matRad_Widget
% matRad_GammaWidget
%
% References
% -
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2020 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.
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


properties
selectedOption1;
selectedOption2;
criteria = [3 3];
n = 0;
localglobal = 'global';
resolution;
lockUpdate = false;
end

events

end

methods
function this = matRad_GammaWidget(handleParent)
matRad_cfg = MatRad_Config.instance();
if nargin < 2
handleParent = figure(...
'Units','normalized',...
'Position',[0.3 0.2 0.4 0.6],...
'Visible','on',...
'Color',matRad_cfg.gui.backgroundColor,... 'CloseRequestFcn',@(hObject,eventdata) figure1_CloseRequestFcn(this,hObject,eventdata),...
'IntegerHandle','off',...
'Colormap',[0 0 0.5625;0 0 0.625;0 0 0.6875;0 0 0.75;0 0 0.8125;0 0 0.875;0 0 0.9375;0 0 1;0 0.0625 1;0 0.125 1;0 0.1875 1;0 0.25 1;0 0.3125 1;0 0.375 1;0 0.4375 1;0 0.5 1;0 0.5625 1;0 0.625 1;0 0.6875 1;0 0.75 1;0 0.8125 1;0 0.875 1;0 0.9375 1;0 1 1;0.0625 1 1;0.125 1 0.9375;0.1875 1 0.875;0.25 1 0.8125;0.3125 1 0.75;0.375 1 0.6875;0.4375 1 0.625;0.5 1 0.5625;0.5625 1 0.5;0.625 1 0.4375;0.6875 1 0.375;0.75 1 0.3125;0.8125 1 0.25;0.875 1 0.1875;0.9375 1 0.125;1 1 0.0625;1 1 0;1 0.9375 0;1 0.875 0;1 0.8125 0;1 0.75 0;1 0.6875 0;1 0.625 0;1 0.5625 0;1 0.5 0;1 0.4375 0;1 0.375 0;1 0.3125 0;1 0.25 0;1 0.1875 0;1 0.125 0;1 0.0625 0;1 0 0;0.9375 0 0;0.875 0 0;0.8125 0 0;0.75 0 0;0.6875 0 0;0.625 0 0;0.5625 0 0],...
'MenuBar','none',...
'Name','MatRad Gamma Analysis',...
'NumberTitle','off',...
'HandleVisibility','callback',...
'Tag','GammaWidget');

end
this = this@matRad_Widget(handleParent);
this.update();
end

function this = initialize(this)

end

function this = update (this,~)
end
end

methods (Access = protected)

function this = createLayout(this)
h89 = this.widgetHandle;

matRad_cfg = MatRad_Config.instance();

this.createHandles();
end
end
methods
function plotGamma()
end
end
end

0 comments on commit 3fe5660

Please sign in to comment.