Changeset 1147 for trunk/src/series/merge_proj.m
- Timestamp:
- May 29, 2024, 7:08:52 PM (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/merge_proj.m
r1137 r1147 232 232 end 233 233 234 %% mask (TODO: case of multilevels)235 MaskData=cell(NbView,1);236 if Param.CheckMask237 if ischar(Param.MaskTable)% case of a single mask (char chain)238 Param.MaskTable={Param.MaskTable};239 end240 for iview=1:numel(Param.MaskTable)241 if exist(Param.MaskTable{iview},'file')242 [MaskData{iview},tild,errormsg] = read_field(Param.MaskTable{iview},'image');243 if ~isempty(transform_fct) && nargin(transform_fct)>=2244 MaskData{iview}=transform_fct(MaskData{iview},XmlData{iview});245 end246 end247 end248 end249 234 250 235 %% Set field names and velocity types … … 319 304 %% transform the input field iview (e.g; phys) if requested (no transform involving two input fields at this stage) 320 305 if ~isempty(transform_fct)&& checksub==0 321 checksub=nargin(transform_fct);322 306 if nargin(transform_fct)>=2 323 307 Data{iview}=transform_fct(Data{iview},XmlData{iview}); … … 345 329 346 330 %% mask 347 if Param.CheckMask && ~isempty(MaskData{iview}) 348 [Data{iview},errormsg]=mask_proj(Data{iview},MaskData{iview}); 331 if Param.CheckMask % introduce multilevel mask like for civ 332 NbSlice=Param.MaskTable{iview,2}; 333 [RootPath_mask,SubDir_mask,RootFile_mask,i1_mask,i2_mask,j1_mask,j2_mask,Ext_mask]=fileparts_uvmat(Param.MaskTable{iview,1}); 334 i1_mask=mod(i1-1,NbSlice)+1; 335 maskname=fullfile_uvmat(RootPath_mask,SubDir_mask,RootFile_mask,Ext_mask,'_1',i1_mask); 336 if ~exist(maskname,'file') 337 maskname=Param.MaskTable{iview,1}; 338 end 339 [MaskData,~,errormsg] = read_field(maskname,'image'); 340 if ~isempty(transform_fct) && nargin(transform_fct)>=2 341 MaskData=transform_fct(MaskData,XmlData{iview}); 342 end 343 if ~isempty(MaskData) 344 [Data{iview},errormsg]=mask_proj(Data{iview},MaskData); 345 end 349 346 end 350 347 end
Note: See TracChangeset
for help on using the changeset viewer.