Changeset 79
- Timestamp:
- Apr 5, 2010, 3:11:51 AM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/mouse_motion.m
r78 r79 105 105 set(0,'Children',hstack);%put back the initial figure stack after plot creation 106 106 else 107 set(hhh,'Visible','on') 107 108 set(hhh,'Position',[AxeData.X(ivec)-AxeData.Mesh/2 AxeData.Y(ivec)-AxeData.Mesh/2 AxeData.Mesh AxeData.Mesh]) 108 109 end … … 135 136 else 136 137 if ~isempty(hhh) 137 delete(hhh)138 set(hhh,'Visible','off') 138 139 end 139 140 end -
trunk/src/series/time_series.m
r76 r79 536 536 %name of result file 537 537 [filemean]=... 538 name_generator(filebase_out,num_i1{1}(i_slice),num_j1{1}(i_slice),'.nc','_i1-i2_j1-j2',1,num_i2{end}(ifile),num_j2{end}(ifile), SubDir{1});538 name_generator(filebase_out,num_i1{1}(i_slice),num_j1{1}(i_slice),'.nc','_i1-i2_j1-j2',1,num_i2{end}(ifile),num_j2{end}(ifile),subdir_result); 539 539 errormsg=struct2nc(filemean,RecordData); %save result file 540 540 if isempty(errormsg) -
trunk/src/set_object.m
r77 r79 778 778 PlotHandles=get_plot_handles(hhuvmat); 779 779 IndexObj=IndexObj_1; 780 elseif strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field780 elseif IndexObj_2<=numel(ListObject)&& strcmp(ListObject{IndexObj_2},ObjectName)% we are editing the object whose projection is viewed in view_field 781 781 hview_field=findobj('tag','view_field'); 782 782 if ~isempty(hview_field) -
trunk/src/transform_field/phys.m
r40 r79 168 168 yima=[0.5 0.5 siz(1)-0.5 siz(1)-0.5]; 169 169 [xcorner_new,ycorner_new]=phys_XYZ(Calib,xima,yima,ZIndex);%corresponding physical coordinates 170 dx(icell)=(max(xcorner_new)-min(xcorner_new))/(siz(2)-1); 171 dy(icell)=(max(ycorner_new)-min(ycorner_new))/(siz(1)-1); 170 172 xcorner=[xcorner xcorner_new]; 171 173 ycorner=[ycorner ycorner_new]; … … 176 178 Rangy(1)=max(ycorner); 177 179 test_multi=(max(npx)~=min(npx)) | (max(npy)~=min(npy)); 178 np x=max(npx);179 np y=max(npy);180 x=linspace(Rangx(1),Rangx(2),np x);181 y=linspace(Rangy(1),Rangy(2),np y);180 npX=1+round((Rangx(2)-Rangx(1))/min(dx));% nbre of pixels in the new image (use the finest resolution min(dx) in the set of images) 181 npY=1+round((Rangy(1)-Rangy(2))/min(dy)); 182 x=linspace(Rangx(1),Rangx(2),npX); 183 y=linspace(Rangy(1),Rangy(2),npY); 182 184 [X,Y]=meshgrid(x,y);%grid in physical coordiantes 183 185 vec_B=[]; … … 192 194 zphys=SliceCoord(3); %to generalize for non-parallel planes 193 195 end 194 [XIMA,YIMA]=px_XYZ(CalibIn{icell},X,Y,zphys);% corresponding image indices for each point in the real space grid195 XIMA=reshape(round(XIMA),1,np x*npy);%indices reorganized in 'line'196 YIMA=reshape(round(YIMA),1,np x*npy);197 flagin=XIMA>=1 & XIMA<=npx & YIMA >=1 & YIMA<=npy;%flagin=1 inside the original image196 [XIMA,YIMA]=px_XYZ(CalibIn{icell},X,Y,zphys);% image coordinates for each point in the real space grid 197 XIMA=reshape(round(XIMA),1,npX*npY);%indices reorganized in 'line' 198 YIMA=reshape(round(YIMA),1,npX*npY); 199 flagin=XIMA>=1 & XIMA<=npx(icell) & YIMA >=1 & YIMA<=npy(icell);%flagin=1 inside the original image 198 200 testuint8=isa(A{icell},'uint8'); 199 201 testuint16=isa(A{icell},'uint16'); 200 202 if numel(siz)==2 %(B/W images) 201 vec_A=reshape(A{icell},1,npx *npy);%put the original image in line203 vec_A=reshape(A{icell},1,npx(icell)*npy(icell));%put the original image in line 202 204 ind_in=find(flagin); 203 205 ind_out=find(~flagin); 204 ICOMB=((XIMA-1)*npy +(npy+1-YIMA));206 ICOMB=((XIMA-1)*npy(icell)+(npy(icell)+1-YIMA)); 205 207 ICOMB=ICOMB(flagin);%index corresponding to XIMA and YIMA in the aligned original image vec_A 206 208 vec_B(ind_in)=vec_A(ICOMB); 207 209 vec_B(ind_out)=zeros(size(ind_out)); 208 A_out{icell}=reshape(vec_B,np y,npx);%new image in real coordinates210 A_out{icell}=reshape(vec_B,npY,npX);%new image in real coordinates 209 211 elseif numel(siz)==3 210 212 for icolor=1:siz(3)
Note: See TracChangeset
for help on using the changeset viewer.