0001 function job_view_lf_update_cortexpattern(inst_id)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 global vbmeg_inst;
0016 if isempty(vbmeg_inst.viewlf{inst_id}.V), return; end
0017
0018
0019
0020
0021
0022 h_fig = vbmeg_inst.viewlf{inst_id}.h_fig;
0023 h_cortex = vbmeg_inst.viewlf{inst_id}.h_cortex;
0024 plot_parm = vbmeg_inst.viewlf{inst_id}.plot_parm;
0025 Jmin_plot = vbmeg_inst.viewlf{inst_id}.Jmin_plot;
0026 Jmax_plot = vbmeg_inst.viewlf{inst_id}.Jmax_plot;
0027 ix_selected_vertex = vbmeg_inst.viewlf{inst_id}.ix_selected_vertex;
0028 cb1 = vbmeg_inst.viewlf{inst_id}.cb1;
0029 cb2 = vbmeg_inst.viewlf{inst_id}.cb2;
0030 cb3 = vbmeg_inst.viewlf{inst_id}.cb3;
0031 rb1 = vbmeg_inst.viewlf{inst_id}.rb1;
0032 basis_org = vbmeg_inst.viewlf{inst_id}.basis_org_smoothed;
0033 F = vbmeg_inst.viewlf{inst_id}.F;
0034
0035
0036
0037
0038
0039
0040
0041
0042 set(h_fig,'Pointer','arrow');
0043
0044
0045 if get(rb1,'Value')==1,
0046 V = vbmeg_inst.viewlf{inst_id}.V;
0047 inf_C = [];
0048 else
0049 V = vbmeg_inst.viewlf{inst_id}.Vinf;
0050 inf_C = vbmeg_inst.viewlf{inst_id}.inf_C;
0051 end
0052
0053
0054 if isempty(basis_org),
0055 isact = 0;
0056 J = [];
0057 else
0058 isact = 1;
0059 J = sum(sqrt(basis_org.^2),1)';
0060 end
0061
0062
0063 if get(cb3,'Value') ~= get(cb3,'Max'),
0064 Jmax_plot = max(abs(J));
0065 Jmin_plot = -1*Jmax_plot;
0066 vbmeg_inst.viewlf{inst_id}.Jmax_plot = Jmax_plot;
0067 vbmeg_inst.viewlf{inst_id}.Jmin_plot = Jmin_plot;
0068 end
0069
0070
0071 LRflag = [];
0072 if get(cb1,'Value')==get(cb1,'Max'), LRflag = 'L'; end
0073 if get(cb2,'Value')==get(cb2,'Max'), LRflag = [LRflag 'R']; end;
0074 if isempty(LRflag),
0075 set(cb1,'Value',get(cb1,'Max'));
0076 LRflag = 'L';
0077 end
0078 plot_parm.LRflag = LRflag;
0079 plot_parm.isact = isact;
0080
0081
0082
0083
0084
0085 set(h_fig,'CurrentAxes',h_cortex);
0086 cla;
0087
0088 vb_plot_cortex(plot_parm,V,F,inf_C,J,Jmin_plot,Jmax_plot);
0089 axis off;
0090 axis tight;
0091 axis equal;
0092 if ~isempty(J),
0093 colormap(jet);
0094
0095
0096 colorbar;
0097 end
0098
0099
0100 plot3(V(ix_selected_vertex,1),V(ix_selected_vertex,2),...
0101 V(ix_selected_vertex,3),'gx','MarkerSize',15,'LineWidth',3);
0102
0103
0104
0105
0106 set(h_fig,'Pointer','arrow');
0107
0108 job_view_lf_push_rotate_button(inst_id);
0109