Changeset 1031 for trunk/src/uvmat.m
- Timestamp:
- Mar 5, 2018, 12:41:34 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r1029 r1031 1011 1011 data.Coord=[]; 1012 1012 otherwise 1013 data.RangeX=[UvData.Field.XMin UvData.Field.XMax]; 1013 1014 data.RangeY=[UvData.Field.YMin UvData.Field.YMax]; 1014 1015 end … … 3290 3291 set(handles.z_index,'String',num2str(z_index)) 3291 3292 end 3292 % inputfilerefresh menu for save_mask if relevant3293 % refresh menu for save_mask if relevant 3293 3294 masknumber=get(handles.masklevel,'String'); 3294 3295 if length(masknumber)>=z_index … … 5877 5878 5878 5879 5879 %TODO: use to modify fill_GUI 5880 %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation 5881 function write_plot_param(handles,PlotParam) 5882 %% axes 5883 if isempty(PlotParam.Axes) 5884 set(handles.Axes,'Visible','off') 5885 set(handles.PlotAxes,'Visible','off') 5886 set(handles.text_display,'Visible','off') 5887 set(handles.TableDisplay,'Visible','on') 5888 else 5889 set(handles.Axes,'Visible','on') 5890 set(handles.PlotAxes,'Visible','on') 5891 set(handles.text_display,'Visible','on') 5892 % if isfield(handles,'TableDisplay') 5893 % set(handles.TableDisplay,'Visible','off') 5880 % %TODO: use to modify fill_GUI 5881 % %'write_plot_param': update the plotting parameters on the uvmat or view_field interface after a plotting operation 5882 % function write_plot_param(handles,PlotParam) 5883 % %% axes 5884 % if isempty(PlotParam.Axes) 5885 % set(handles.Axes,'Visible','off') 5886 % set(handles.PlotAxes,'Visible','off') 5887 % set(handles.text_display,'Visible','off') 5888 % set(handles.TableDisplay,'Visible','on') 5889 % else 5890 % set(handles.Axes,'Visible','on') 5891 % set(handles.PlotAxes,'Visible','on') 5892 % set(handles.text_display,'Visible','on') 5893 % % if isfield(handles,'TableDisplay') 5894 % % set(handles.TableDisplay,'Visible','off') 5895 % % end 5896 % Coordinates=PlotParam.Axes; 5897 % if isfield(Coordinates,'CheckFixAspectRatio') 5898 % if Coordinates.CheckFixAspectRatio 5899 % set(handles.CheckFixAspectRatio,'Value',1) 5900 % else 5901 % set(handles.CheckFixAspectRatio,'Value',0) 5902 % 5903 % end 5894 5904 % end 5895 Coordinates=PlotParam.Axes; 5896 if isfield(Coordinates,'CheckFixAspectRatio') 5897 if Coordinates.CheckFixAspectRatio 5898 set(handles.CheckFixAspectRatio,'Value',1) 5899 else 5900 set(handles.CheckFixAspectRatio,'Value',0) 5901 5902 end 5903 end 5904 if isfield(Coordinates,'AspectRatio') 5905 set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio)) 5906 end 5907 if isfield(Coordinates,'MinX') 5908 set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 5909 set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 5910 set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 5911 set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 5912 else 5913 set(handles.num_MinX,'String',''); 5914 set(handles.num_MaxX,'String',''); 5915 set(handles.num_MinY,'String',''); 5916 set(handles.num_MaxY,'String',''); 5917 end 5918 end 5919 5920 %% scalar or image parameters 5921 if isfield(PlotParam,'Scalar') 5922 set(handles.Scalar,'Visible','on') 5923 if isfield(PlotParam.Scalar,'MaxA') 5924 set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); 5925 end 5926 if isfield(PlotParam.Scalar,'MinA') 5927 set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 5928 end 5929 if isfield(PlotParam.Scalar,'IncrA') 5930 set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 5931 end 5932 set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW) 5933 if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity') 5934 set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 5935 end 5936 else 5937 set(handles.Scalar,'Visible','off') 5938 end 5939 5940 %% parameter for vector field 5941 if isfield(PlotParam,'Vectors') 5942 set(handles.Vectors,'Visible','on') 5943 if isfield(PlotParam.Vectors,'VecScale') 5944 set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) 5945 end 5946 if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') 5947 MinC=PlotParam.Vectors.MinC; 5948 MaxC=PlotParam.Vectors.MaxC; 5949 set(handles.num_MinVec,'String', num2str(MinC,3)); 5950 set(handles.num_MaxVec,'String',num2str(MaxC,3)); 5951 list=get(handles.ColorCode,'String'); 5952 ichoice=get(handles.ColorCode,'Value'); 5953 color_option=list{ichoice}; 5954 test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 5955 if test3color% need to update color thresholds 5956 set(handles.num_ColCode1,'Visible','on') 5957 set(handles.num_ColCode2,'Visible','on') 5958 set(handles.Slider1,'Visible','on') 5959 set(handles.Slider2,'Visible','on') 5960 set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3)) 5961 set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3)) 5962 set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC)) 5963 set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC)) 5964 else 5965 set(handles.num_ColCode1,'Visible','off') 5966 set(handles.num_ColCode2,'Visible','off') 5967 set(handles.Slider1,'Visible','off') 5968 set(handles.Slider2,'Visible','off') 5969 end 5970 end 5971 else 5972 set(handles.Vectors,'Visible','off') 5973 if isfield(handles,'edit_vect') 5974 set(handles.edit_vect,'Visible','off') 5975 set(handles.record,'Visible','off') 5976 end 5977 end 5905 % if isfield(Coordinates,'AspectRatio') 5906 % set(handles.num_AspectRatio,'String',num2str(Coordinates.AspectRatio)) 5907 % end 5908 % if isfield(Coordinates,'MinX') 5909 % set(handles.num_MinX,'String',num2str(Coordinates.MinX,4)); 5910 % set(handles.num_MaxX,'String',num2str(Coordinates.MaxX,4)); 5911 % set(handles.num_MinY,'String',num2str(Coordinates.MinY,4)); 5912 % set(handles.num_MaxY,'String',num2str(Coordinates.MaxY,4)); 5913 % else 5914 % set(handles.num_MinX,'String',''); 5915 % set(handles.num_MaxX,'String',''); 5916 % set(handles.num_MinY,'String',''); 5917 % set(handles.num_MaxY,'String',''); 5918 % end 5919 % end 5920 % 5921 % %% scalar or image parameters 5922 % if isfield(PlotParam,'Scalar') 5923 % set(handles.Scalar,'Visible','on') 5924 % if isfield(PlotParam.Scalar,'MaxA') 5925 % set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); 5926 % end 5927 % if isfield(PlotParam.Scalar,'MinA') 5928 % set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3)); 5929 % end 5930 % if isfield(PlotParam.Scalar,'IncrA') 5931 % set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) 5932 % end 5933 % set(handles.CheckBW,'Value',PlotParam.Scalar.CheckBW) 5934 % if isfield(PlotParam.Scalar,'Opacity')&&isfield(handles,'num_Opacity') 5935 % set(handles.num_Opacity,'String',num2str(PlotParam.Scalar.Opacity)) 5936 % end 5937 % else 5938 % set(handles.Scalar,'Visible','off') 5939 % end 5940 % 5941 % %% parameter for vector field 5942 % if isfield(PlotParam,'Vectors') 5943 % set(handles.Vectors,'Visible','on') 5944 % if isfield(PlotParam.Vectors,'VecScale') 5945 % set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) 5946 % end 5947 % if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') 5948 % MinC=PlotParam.Vectors.MinC; 5949 % MaxC=PlotParam.Vectors.MaxC; 5950 % set(handles.num_MinVec,'String', num2str(MinC,3)); 5951 % set(handles.num_MaxVec,'String',num2str(MaxC,3)); 5952 % list=get(handles.ColorCode,'String'); 5953 % ichoice=get(handles.ColorCode,'Value'); 5954 % color_option=list{ichoice}; 5955 % test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); 5956 % if test3color% need to update color thresholds 5957 % set(handles.num_ColCode1,'Visible','on') 5958 % set(handles.num_ColCode2,'Visible','on') 5959 % set(handles.Slider1,'Visible','on') 5960 % set(handles.Slider2,'Visible','on') 5961 % set(handles.num_ColCode1,'String',num2str(PlotParam.Vectors.ColCode1,3)) 5962 % set(handles.num_ColCode2,'String',num2str(PlotParam.Vectors.ColCode2,3)) 5963 % set(handles.Slider1,'Value',(PlotParam.Vectors.ColCode1-MinC)/(MaxC-MinC)) 5964 % set(handles.Slider2,'Value',(PlotParam.Vectors.ColCode2-MinC)/(MaxC-MinC)) 5965 % else 5966 % set(handles.num_ColCode1,'Visible','off') 5967 % set(handles.num_ColCode2,'Visible','off') 5968 % set(handles.Slider1,'Visible','off') 5969 % set(handles.Slider2,'Visible','off') 5970 % end 5971 % end 5972 % else 5973 % set(handles.Vectors,'Visible','off') 5974 % if isfield(handles,'edit_vect') 5975 % set(handles.edit_vect,'Visible','off') 5976 % set(handles.record,'Visible','off') 5977 % end 5978 % end 5978 5979 5979 5980 % --------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.