Changeset 150 for trunk/src/uvmat.m
- Timestamp:
- Dec 3, 2010, 12:16:51 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r147 r150 1014 1014 txt=ver('MATLAB'); 1015 1015 Release=txt.Release; 1016 relnumb=str2 num(Release(3:4));1016 relnumb=str2double(Release(3:4)); 1017 1017 if relnumb >= 14 1018 1018 save (profil_perso,'MenuFile_1','MenuFile_2','MenuFile_3','MenuFile_4', 'MenuFile_5','-V6'); %store the file names for future opening of uvmat … … 2167 2167 FileType_1='vol'; 2168 2168 FieldName_1='image'; 2169 else 2169 elseif length(Ext_1)>1 2170 2170 form=imformats(Ext_1(2:end)); 2171 2171 if ~isempty(form)% if the extension corresponds to an image format recognized by Matlab … … 2688 2688 IndexObj_2=get(handles.list_object_2,'Value');%selected projection object for the second view 2689 2689 if isequal(get(handles.list_object_2,'Visible'),'on') && IndexObj_2 <= numel(UvData.Object)&& ~isempty(UvData.Object{IndexObj_2}) 2690 UvData.Object{IndexObj_2} 2690 2691 IndexObj(2)=IndexObj_2; 2691 2692 view_field_handle=findobj(allchild(0),'tag','view_field');%handles of the view_field GUI … … 2702 2703 for imap=1:numel(IndexObj) 2703 2704 iobj=IndexObj(imap); 2704 ObjectData=proj_field(UvData.Field,UvData.Object{iobj},iobj);% project field on the object 2705 2705 [ObjectData,errormsg]=proj_field(UvData.Field,UvData.Object{iobj},iobj);% project field on the object 2706 if ~isempty(errormsg) 2707 return 2708 end 2706 2709 %use of mask (TODO: check) 2707 2710 if isfield(ObjectData,'NbDim') && isequal(ObjectData.NbDim,2) && isfield(ObjectData,'Mask') && isfield(ObjectData,'A') … … 2756 2759 [PlotType,PlotParamOut]=plot_field(ObjectData,haxes(imap),PlotParam{imap},keeplim(imap),PosColorbar{imap}); 2757 2760 write_plot_param(plot_handles{imap},PlotParamOut) %update the auto plot parameters 2758 if imap==1 2759 UvData.ProjField=ObjectData; 2761 if isfield(UvData,'Mesh')&~isempty(UvData.Mesh) 2762 ObjectData.Mesh=UvData.Mesh; % gives an estimated mesh size (useful for mouse action on the plot) 2763 end 2764 if imap==1 2765 UvData.axes3=ObjectData; 2760 2766 else 2761 2767 ViewFieldData=get(view_field_handle,'UserData'); 2762 ViewFieldData. ProjField=ObjectData;2768 ViewFieldData.axes3=ObjectData; 2763 2769 set(view_field_handle,'UserData',ViewFieldData) 2764 2770 end … … 4359 4365 %------------------------------------------------------------------- 4360 4366 haxes= handles.axes3; 4361 AxeData=get(haxes,'UserData'); 4367 UvData=get(handles.uvmat,'UserData'); 4368 AxeData=UvData.axes3; 4362 4369 PlotParam=read_plot_param(handles); 4363 4370 [PlotType,PlotParamOut]= plot_field(AxeData,haxes,PlotParam,1); … … 4936 4943 ind_opening=2;% propose 'fix' as the default option 4937 4944 % +read the current netcdf rootfile 4938 Data=nc2struct(FileName, []);4939 if isfield(Data,'fix') & isequal(Data.fix,1)4945 Data=nc2struct(FileName,'ListGlobalAttribute','fix','patch','civ2','fix2'); 4946 if isfield(Data,'fix') && isequal(Data.fix,1) 4940 4947 ind_opening=3; 4941 4948 end 4942 if isfield(Data,'patch') & isequal(Data.patch,1)4949 if isfield(Data,'patch') && isequal(Data.patch,1) 4943 4950 ind_opening=4; 4944 4951 end 4945 if isfield(Data,'civ2') & isequal(Data.civ2,1)4952 if isfield(Data,'civ2') && isequal(Data.civ2,1) 4946 4953 ind_opening=5; 4947 4954 end 4948 if isfield(Data,'fix2') & isequal(Data.fix2,1)4955 if isfield(Data,'fix2') && isequal(Data.fix2,1) 4949 4956 ind_opening=6; 4950 4957 end … … 4960 4967 param.ImaExt=ext; 4961 4968 civ(param);% interface de civ(not in the uvmat file) 4962 4969 4963 4970 % ------------------------------------------------------------------ 4964 4971 function MenuTools_Callback(hObject, eventdata, handles)
Note: See TracChangeset
for help on using the changeset viewer.