function CreateViolaPanel(handles)
%
% Copyright 2010, Joseph O. Deasy, on behalf of the CERR development team.
% 
% This file is part of The Computational Environment for Radiotherapy Research (CERR).
% 
% CERR development has been led by:  Aditya Apte, Divya Khullar, James Alaly, and Joseph O. Deasy.
% 
% CERR has been financially supported by the US National Institutes of Health under multiple grants.
% 
% CERR is distributed under the terms of the Lesser GNU Public License. 
% 
%     This version of CERR is free software: you can redistribute it and/or modify
%     it under the terms of the GNU General Public License as published by
%     the Free Software Foundation, either version 3 of the License, or
%     (at your option) any later version.
% 
% CERR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
% without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% See the GNU General Public License for more details.
% 
% You should have received a copy of the GNU General Public License
% along with CERR.  If not, see <http://www.gnu.org/licenses/>.


    %Viola Panel
    handles.violaPanel = uipanel('Parent',handles.toolPanel,'Units','normalize','FontSize',10,'Title','Viola Optimizer Setup',...
                                    'Tag','violaPanel','Clipping','off',...
                                    'Position',[0 0 1 1],...
                                    'Visible','on');
    dx = 0; dy = 0;                                
%%
    h282 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[9.87096774193548+dx 305+dy 167.562724014337 25.0167597765363],...
    'String','Standard Deviation Fixed:',...
    'Style','text',...
    'Tag','text43');

   
    handles.viola_sdF = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 310+dy 70.573476702509 20],...
    'String','0.4',...
    'Style','edit',...
    'Tag','viola_sdF');

    
    h284 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[6.91397849462366+dx 285+dy 170.519713261649 20],...
    'String','Standard Deviation Moving:',...
    'Style','text',...
    'Tag','text44');

    
    handles.viola_sdM = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 285+dy 70.573476702509 20],...
    'String','0.4',...
    'Style','edit',...
    'Tag','viola_sdM');

    
    h286 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[7.89964157706093+dx 260+dy 169.534050179211 20],...
    'String','Smoother Variance Fixed:',...
    'Style','text',...
    'Tag','text45');

    handles.viola_svF = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 260+dy 70.573476702509 20],...
    'String','2.0',...
    'Style','edit',...
    'Tag','viola_svF');

    h288 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[6.91397849462366+dx 235.837988826816+dy 170.519713261649 20],...
    'String','Smoother Variance Moving:',...
    'Style','text',...
    'Tag','text46');

    handles.viola_svM = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 234.798882681564+dy 70.573476702509 20],...
    'String','2.0',...
    'Style','edit',...
    'Tag','viola_svM');
%%

    h290 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[9.87096774193548+dx 197.391061452514+dy 167.562724014337 20],...
    'String','Number of Samples(%):',...
    'Style','text',...
    'Tag','text47');

    h291 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[8.88530465949821+dx 67.5027932960894+dy 168.548387096774 20],...
    'String','Maximum Step:',...
    'Style','text',...
    'Tag','text48');

    handles.viola_sn = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 200.508379888268+dy 70.573476702509 20],...
    'String','0.01',...
    'Style','edit',...
    'Tag','viola_sn');

    handles.viola_maxstep = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 69.5810055865922+dy 70.573476702509 20],...
    'String','16.0',...
    'Style','edit',...
    'Tag','viola_maxstep');

    h294 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[6.91397849462366+dx 38.4078212290503+dy 170.519713261649 20],...
    'String','Iteration Number :',...
    'Style','text',...
    'Tag','text49');

    handles.viola_in = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 38.4078212290503+dy 70.573476702509 20],...
    'String','50',...
    'Style','edit',...
    'Tag','viola_in');

    h296 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[6.91397849462366+dx 7.23463687150838+dy 170.519713261649 20],...
    'String','Registration Levels :',...
    'Style','text',...
    'Tag','text116');

    handles.viola_reglevels = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 7.23463687150838+dy 70.573476702509 20],...
    'String','3',...
    'Style','edit',...
    'Tag','viola_reglevels');

    h298 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[8.88530465949821+dx 100.754189944134+dy 168.548387096774 20],...
    'String','Minimum Step:',...
    'Style','text',...
    'Tag','text117');

    handles.viola_minstep = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[187.290322580645+dx 102.832402234637+dy 70.573476702509 20],...
    'String','2.5',...
    'Style','edit',...
    'Tag','viola_minstep');

    h300 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[7.89964157706093+dx 132.966480446927+dy 168.548387096774 20],...
    'String','Translation Scale:',...
    'Style','text',...
    'Tag','text118');

    handles.viola_tscale = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[186.304659498208+dx 135.04469273743+dy 70.573476702509 20],...
    'String','0.001',...
    'Style','edit',...
    'Tag','viola_tscale');

    h302 = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[7.89964157706093+dx 166.217877094972+dy 168.548387096774 20],...
    'String','Rotation Scale:',...
    'Style','text',...
    'Tag','text119');

    handles.viola_rscale = uicontrol(...
    'Parent',handles.violaPanel,...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[186.304659498208+dx 168.296089385475+dy 70.573476702509 20],...
    'String','1.0',...
    'Style','edit',...
    'Tag','viola_rscale');


    guidata(handles.mainframe, handles);
    
end

    