
function CreateAffinePanel(handles)


    %Affine Panel
    handles.affinePanel = uipanel('Parent',handles.toolPanel,'Units','normalize','FontSize',10,'Title','Registration Parameters',...
                                    'Tag','affinePanel','Clipping','off',...
                                    'Position',[0 0 1 1],...
                                    'Visible','on');
    dy = 160;                                
    h312 = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[9 124+dy 117 19],...
    'String','Translation Scale:',...
    'Style','text',...
    'Tag','text62');

    handles.affine_tscale = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[129 122+dy 78 23],...
    'String','0.001',...
    'Style','edit',...
    'Tag','affine_tscale');

    handles.affine_minstep = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[129 86+dy 78 24],...
    'String','0.01',...
    'Style','edit',...
    'Tag','affine_minstep');

    handles.affine_maxstep = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[129 52+dy 78 23],...
    'String','1.0',...
    'Style','edit',...
    'Tag','affine_maxstep');

    h316 = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[8 92+dy 118 17],...
    'String','Minimum Step:',...
    'Style','text',...
    'Tag','text65');

    h317 = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[8 58+dy 118 17],...
    'String','Maximum Step:',...
    'Style','text',...
    'Tag','text66');

    h318 = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','right',...
    'Position',[8 24+dy 118 17],...
    'String','Iteration Number :',...
    'Style','text',...
    'Tag','text67');

    handles.affine_iternum = uicontrol(...
    'Parent',handles.affinePanel,...
    'Units','pixel',...
    'FontSize',10,...
    'HorizontalAlignment','left',...
    'Position',[129 19+dy 78 23],...
    'String','200',...
    'Style','edit',...
    'Tag','affine_iternum');

    guidata(handles.mainframe, handles);
    
end

    