Changeset 642 for trunk/src/series
- Timestamp:
- May 23, 2013, 12:33:04 AM (12 years ago)
- Location:
- trunk/src/series
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/civ_input.m
r637 r642 97 97 NomTypeNc=''; 98 98 switch FileType 99 case {'image','multimage','video','mmreader'} 100 NomTypeImaA=NomTypeInput; 99 case {'image','multimage','video','mmreader'} 100 NomTypeImaA=NomTypeInput; 101 iview_image=1;%line # for the input images 101 102 case 'civdata' 102 103 if ~strcmp(Param.Action.ActionName,'civ_series') … … 111 112 else 112 113 set(handles.ListCompareMode,'Value',1) 113 % set(handles.RootFile_1,'Visible','Off');114 % set(handles.RootFile_1,'Visible','Off'); 114 115 end 115 116 imageinput=''; … … 117 118 [PathCiv1_ImageA,Civ1_ImageA,FileExtA]=fileparts(Data.Civ1_ImageA); 118 119 [PathCiv1_ImageB,Civ1_ImageB,FileExtA]=fileparts(Data.Civ1_ImageB); 119 % set(handles.Civ1_ImageA,'String',Civ1_ImageA)120 % set(handles.Civ1_ImageB,'String',Civ1_ImageB)120 % set(handles.Civ1_ImageA,'String',Civ1_ImageA) 121 % set(handles.Civ1_ImageB,'String',Civ1_ImageB) 121 122 if ~isempty(Data.Civ2_ImageA) 122 [PathCiv2_ImageA,Civ2_ImageA,FileExtA]=fileparts(Data.Civ2_ImageA);123 [PathCiv2_ImageB,Civ2_ImageB,FileExtA]=fileparts(Data.Civ2_ImageB);124 % set(handles.Civ2_ImageA,'String',Civ2_ImageA)125 % set(handles.Civ2_ImageB,'String',Civ2_ImageB)123 [PathCiv2_ImageA,Civ2_ImageA,FileExtA]=fileparts(Data.Civ2_ImageA); 124 [PathCiv2_ImageB,Civ2_ImageB,FileExtA]=fileparts(Data.Civ2_ImageB); 125 % set(handles.Civ2_ImageA,'String',Civ2_ImageA) 126 % set(handles.Civ2_ImageB,'String',Civ2_ImageB) 126 127 end 127 128 hhseries=guidata(gcbf); 128 129 if size(Param.InputTable,1)==1 129 series('display_file_name',hhseries,Data.Civ1_ImageA,'append');130 end 131 if isfield(Data,'Txt')132 errormsg=Data.Txt;133 return134 %TODO: introduce the image in the input table of series135 end130 series('display_file_name',hhseries,Data.Civ1_ImageA,'append'); 131 end 132 if isfield(Data,'Txt') 133 errormsg=Data.Txt; 134 return 135 %TODO: introduce the image in the input table of series 136 end 136 137 [RootPath,SubDir,RootFile,i1,i2,j1,j2,FileExt,NomTypeImaA]=fileparts_uvmat(Data.Civ1_ImageA); 137 138 [RootPath,SubDir,RootFile,i1,i2,j1,j2,FileExt,NomTypeImaB]=fileparts_uvmat(Data.Civ1_ImageB); 139 iview_image=2;%line # for the input images 138 140 case 'civxdata'% case of civx data, 139 141 NomTypeNc=NomTypeInput; … … 142 144 msgbox_uvmat('ERROR','old civX convention, use the GUI civ') 143 145 return 144 145 146 end 146 147 … … 193 194 194 195 %% set the menus of image pairs and default selection for civ_input %%%%%%%%%%%%%%%%%%% 195 MaxIndex_i=Param.IndexRange.MaxIndex_i( 1);196 MinIndex_i=Param.IndexRange.MinIndex_i( 1);196 MaxIndex_i=Param.IndexRange.MaxIndex_i(iview_image); 197 MinIndex_i=Param.IndexRange.MinIndex_i(iview_image); 197 198 MaxIndex_j=1;%default 198 199 MinIndex_j=1; 199 200 if isfield(Param.IndexRange,'MaxIndex_j')&&isfield(Param.IndexRange,'MinIndex_j') 200 MaxIndex_j=Param.IndexRange.MaxIndex_j( 1);201 MinIndex_j=Param.IndexRange.MinIndex_j( 1);201 MaxIndex_j=Param.IndexRange.MaxIndex_j(iview_image); 202 MinIndex_j=Param.IndexRange.MinIndex_j(iview_image); 202 203 end 203 204 CivInputData.MaxIndex_i=MaxIndex_i; … … 1251 1252 end 1252 1253 end 1254 1253 1255 end 1254 1256 [dtsort,indsort]=sort(dt); -
trunk/src/series/merge_proj.m
r640 r642 161 161 NomTypeOut=NomType;% output file index will indicate the first and last ref index in the series 162 162 163 %% mask (TODO: case of multilevels) 164 if Param.CheckMask 165 MaskData=cell(NbView,1); 166 MaskSubDir=regexprep(Param.InputTable{iview,2},'\..*','');%take the root part of SubDir, before the first dot '.' 167 MaskName=fullfile(Param.InputTable{iview,1},[MaskSubDir '.mask'],'mask_1.png'); 168 if exist(MaskName,'file') 169 [MaskData{iview},tild,errormsg] = read_field(MaskName,'image'); 170 if ~isempty(transform_fct) && nargin(transform_fct)>=2 171 MaskData{iview}=transform_fct(MaskData,XmlData{iview}); 172 end 173 end 174 end 175 163 176 %% Set field names and velocity types 164 177 %use Param.InputFields for all views … … 174 187 for index=1:NbField 175 188 update_waitbar(WaitbarHandle,index/NbField) 176 if ~isempty(RUNHandle) && ishandle(RUNHandle) &&~strcmp(get(RUNHandle,'BusyAction'),'queue')189 if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') 177 190 disp('program stopped by user') 178 191 return … … 196 209 Data{iview}.ZIndex=mod(i1_series{iview}(index)-1,NbSlice_calib{iview})+1;%Zindex for phys transform 197 210 end 198 211 199 212 %% transform the input field (e.g; phys) if requested (no transform involving two input fields) 200 213 if ~isempty(transform_fct) … … 206 219 end 207 220 208 221 %% calculate tps coefficients if needed 209 222 check_proj_tps= isfield(Param,'ProjObject')&&~isempty(Param.ProjObject)&& strcmp(Param.ProjObject.ProjMode,'interp_tps')&&~isfield(Data{iview},'Coord_tps'); 210 223 Data{iview}=tps_coeff_field(Data{iview},check_proj_tps); 211 224 212 225 %% projection on object (gridded plane) 213 226 if Param.CheckObject … … 220 233 221 234 %% mask 222 if isfield(Param,'Mask') 223 %TODO: introduce a table of masks for multiple views 224 [MaskData{iview},tild,errormsg] = read_field(Param.Mask,'image'); 225 if ~isempty(transform_fct) && nargin(transform_fct)>=2 226 MaskData{iview}=transform_fct(MaskData,XmlData{iview}); 227 end 228 [Data{iview},errormsg]=mask_proj(Data{iview},MaskData{iview}); 235 if Param.CheckMask && ~isempty(MaskData{iview}) 236 [Data{iview},errormsg]=mask_proj(Data{iview},MaskData{iview}); 229 237 end 230 238 end -
trunk/src/series/sub_background.m
r633 r642 113 113 CheckImage=~isempty(find(strcmp(FileType,ImageTypeOptions), 1));% =1 for images 114 114 if ~CheckImage 115 msgbox_uvmat('ERROR',['invalid file type input: ' FileType {1}' not an image'])115 msgbox_uvmat('ERROR',['invalid file type input: ' FileType ' not an image']) 116 116 return 117 117 end
Note: See TracChangeset
for help on using the changeset viewer.