Changeset 182


Ignore:
Timestamp:
Jan 23, 2011, 6:55:29 PM (10 years ago)
Author:
sommeria
Message:

introduction of a button OK to close the status GUI in civ, bug repair for volume images .vol (uvmat and set_object)

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r180 r182  
    46394639    hfig=figure;
    46404640    set(hfig,'name','civ_status')
    4641     hlist=uicontrol('Style','listbox','Units','normalized', 'Position',[0.05 0.05 0.9 0.75], 'Callback', @open_view_field,'tag','list');
     4641    hlist=uicontrol('Style','listbox','Units','normalized', 'Position',[0.05 0.09 0.9 0.71], 'Callback', @open_view_field,'tag','list');
    46424642    uicontrol('Style','listbox','Units','normalized', 'Position', [0.05 0.87 0.9 0.1],'tag','msgbox');
    46434643    uicontrol('Style','frame','Units','normalized', 'Position', [0.05 0.81 0.9 0.05]);
     4644    uicontrol('Style','pushbutton','Units','normalized', 'Position', [0.7 0.01 0.2 0.07],'String','OK','FontWeight','bold','FontUnits','normalized','FontSize',0.9,'Callback',@close_GUI);
    46444645    BarPosition=[0.05 0.81 0.01 0.05];
    46454646    hwaitbar=uicontrol('Style','frame','Units','normalized', 'Position',BarPosition ,'BackgroundColor',[1 0 0],'tag','waitbar');
     
    47364737      end
    47374738
    4738 
     4739%-------------------------------------------------------------------   
     4740% call 'view_field.fig' to display the selected field
     4741function close_GUI(hObject, eventdata)
     4742%-------------------------------------------------------------------
     4743     delete(gcbf)
  • trunk/src/read_field.m

    r181 r182  
    120120    ParamOut.FieldName='image';
    121121    ParamOut.FieldList={'image'};
     122    Npz=1;%default
    122123    switch FileType
    123124        case 'movie'
     
    151152            FieldName='image';
    152153    end
    153     Npz=1;%default
    154154    npxy=size(A);
    155     ParamOut.Npx=npxy(2);% display image size on the interface
    156     ParamOut.Npy=npxy(1);
    157155    Rangx=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers
    158156    Rangy=[npxy(1)-0.5 0.5]; %
     
    165163            Field.AY=[npxy(1)-0.5 0.5];
    166164            Field.AX=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers
     165            ParamOut.Npx=npxy(2);% display image size on the interface
     166            ParamOut.Npy=npxy(1);
    167167        else
    168168            Field.NbDim=3;
     
    172172            Field.AY=[npxy(2)-0.5 0.5];
    173173            Field.AX=[0.5 npxy(3)-0.5]; % coordinates of the first and last pixel centers
     174            ParamOut.Npx=npxy(3);% display image size on the interface
     175            ParamOut.Npy=npxy(2);
    174176        end
    175177    else
     
    177179        Field.AY=[npxy(1)-0.5 0.5];
    178180        Field.AX=[0.5 npxy(2)-0.5]; % coordinates of the first and last pixel centers
     181        ParamOut.Npx=npxy(2);% display image size on the interface
     182        ParamOut.Npy=npxy(1);
    179183    end
    180184    Field.A=A;
  • trunk/src/set_object.m

    r180 r182  
    744744projview='view_field';%default
    745745if strcmp(ListObject{IndexObj_1},ObjectName)% we are editing the object whose projection is viewed in the uvmat frame
    746 %    ObjectData.HandlesDisplay=hhuvmat.axes3;
    747 %     Object_set{iobj}.DisplayHandle_view_field
    748746    IndexObj=IndexObj_1;
    749747    projview='uvmat';
     
    751749elseif ~isempty(IndexObj_2) && IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field 
    752750    IndexObj=IndexObj_2;
    753 %     projview='view_field';
    754751else %new object
    755752    testnew=1;
     
    759756        PlotHandles=guidata(hview_field);
    760757        plotaxes=PlotHandles.axes3;%handle of axes3 in view_field
    761 %         ObjectData.HandlesDisplay=PlotHandles.axes3;%handle of axes3 in view_field
    762758    end
    763759end
     
    803799    ObjectData.DisplayHandle_uvmat=hhuvmat.axes3;
    804800    ObjectData.DisplayHandle_view_field=[];
    805 elseif isfield(UvData.Object{IndexObj},'DisplayHandle_uvmat')% save the previous object graph handles
    806     ObjectData.DisplayHandle_uvmat=UvData.Object{IndexObj}.DisplayHandle_uvmat;
    807     ObjectData.DisplayHandle_view_field=UvData.Object{IndexObj}.DisplayHandle_view_field;
    808 else
    809     ObjectData.DisplayHandle_uvmat=hhuvmat.axes3;
    810     ObjectData.DisplayHandle_view_field=[];
     801else
     802    if isfield(UvData.Object{IndexObj},'DisplayHandle_uvmat')% save the previous object graph handles
     803        ObjectData.DisplayHandle_uvmat=UvData.Object{IndexObj}.DisplayHandle_uvmat;
     804    else
     805        ObjectData.DisplayHandle_uvmat=hhuvmat.axes3;%there is no object handle, than the axes handles is used as input
     806    end
     807    if isfield(UvData.Object{IndexObj},'DisplayHandle_view_field')% save the previous object graph handles
     808        ObjectData.DisplayHandle_view_field=UvData.Object{IndexObj}.DisplayHandle_view_field;
     809    else
     810        ObjectData.DisplayHandle_view_field=[];
     811    end
    811812end
    812813UvData.Object{IndexObj}=ObjectData;%update the current object properties
Note: See TracChangeset for help on using the changeset viewer.