Changeset 444 for trunk/src/uvmat.m
- Timestamp:
- Jun 7, 2012, 9:56:19 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r441 r444 1359 1359 errormsg='no file browsed'; 1360 1360 end 1361 [RootDir,tild,RootFile,tild,tild,tild,tild,tild,Mask.NomType]=fileparts_uvmat(maskname); 1362 % [RootDir,RootFile,x1,x2,xa,xb,xext,Mask.NomType]=name2display(maskname); 1363 Mask.Base=fullfile(RootDir,RootFile); 1361 [RootDir,SubDir,RootFile,tild,tild,tild,tild,tild,Mask.NomType]=fileparts_uvmat(maskname); 1362 Mask.Base=fullfile(RootDir,SubDir,RootFile); 1364 1363 Mask.NbSlice=1; 1365 1364 set(handles.CheckMask,'UserData',Mask); … … 1398 1397 [RootPath,RootFile]=fileparts(MaskData.Base); 1399 1398 MaskName=fullfile_uvmat(RootPath,'',RootFile,'.png',MaskData.NomType,num_i1_mask,[],num_j1); 1400 %MaskName=name_generator(MaskData.Base,num_i1_mask,num_j1,'.png',MaskData.NomType);1401 % huvmat=get(handles.CheckMask,'parent');1402 1399 UvData=get(handles.uvmat,'UserData'); 1403 1400 %update mask image if the mask is new … … 4716 4713 %mask name 4717 4714 RootPath=get(handles.RootPath,'String'); 4715 SubDir=get(handles.SubDir,'String'); 4718 4716 RootFile=get(handles.RootFile,'String'); 4719 4717 if ~isempty(RootFile)&&(isequal(RootFile(1),'/')|| isequal(RootFile(1),'\')) 4720 4718 RootFile(1)=[]; 4721 4719 end 4722 filebase=fullfile(RootPath,RootFile);4720 % filebase=fullfile(RootPath,RootFile); 4723 4721 list=get(handles.masklevel,'String'); 4724 4722 masknumber=num2str(length(list)); 4725 4723 maskindex=get(handles.masklevel,'Value'); 4726 mask_name=fullfile_uvmat(RootPath,'',[RootFile '_' masknumber 'mask'],'.png','_1',maskindex);4727 %mask_name=name_generator([filebase '_' masknumber 'mask'],maskindex,1,'.png','_i');4724 % mask_name=fullfile_uvmat(RootPath,'',[RootFile '_' masknumber 'mask'],'.png','_1',maskindex); 4725 mask_name=fullfile_uvmat(RootPath,[SubDir '.mask'],'mask','.png','_1',maskindex); 4728 4726 imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200) 4729 4727 imflag=flipdim(imflag,1); … … 4740 4738 mask_dir=fileparts(answer); 4741 4739 if ~exist(mask_dir,'dir') 4742 msgbox_uvmat('ERROR',['directory ' mask_dir ' does not exist']) 4743 return 4740 [xx,msg1]=mkdir(mask_dir); 4741 if ~strcmp(msg1,'') 4742 errormsg=['cannot create ' mask_dir ': ' msg1];%error message for directory creation 4743 return 4744 end 4744 4745 end 4745 4746 imwrite(imflag,answer,'BitDepth',8); 4746 4747 end 4747 4748 set(handles.ListObject,'Value',1) 4748 % set(handles.ListObject,'Max',1)4749 4749 end 4750 4750
Note: See TracChangeset
for help on using the changeset viewer.