Changeset 444 for trunk/src/uvmat.m


Ignore:
Timestamp:
Jun 7, 2012, 9:56:19 AM (9 years ago)
Author:
sommeria
Message:

masks and calibration updated to fit with the new conventions on file organisation.
bug corrected in mouse_up (object creation)
bug corrected in civ in mode TESTciv

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/uvmat.m

    r441 r444  
    13591359            errormsg='no file browsed';
    13601360        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);
    13641363        Mask.NbSlice=1;
    13651364        set(handles.CheckMask,'UserData',Mask);
     
    13981397[RootPath,RootFile]=fileparts(MaskData.Base);
    13991398MaskName=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');
    14021399UvData=get(handles.uvmat,'UserData');
    14031400%update mask image if the mask is new
     
    47164713    %mask name
    47174714    RootPath=get(handles.RootPath,'String');
     4715    SubDir=get(handles.SubDir,'String');
    47184716    RootFile=get(handles.RootFile,'String');
    47194717    if ~isempty(RootFile)&&(isequal(RootFile(1),'/')|| isequal(RootFile(1),'\'))
    47204718        RootFile(1)=[];
    47214719    end
    4722     filebase=fullfile(RootPath,RootFile);
     4720   % filebase=fullfile(RootPath,RootFile);
    47234721    list=get(handles.masklevel,'String');
    47244722    masknumber=num2str(length(list));
    47254723    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);
    47284726    imflag=uint8(255*(0.392+0.608*flag));% =100 for flag=0 (vectors not computed when 20<imflag<200)
    47294727    imflag=flipdim(imflag,1);
     
    47404738        mask_dir=fileparts(answer);
    47414739        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
    47444745        end
    47454746        imwrite(imflag,answer,'BitDepth',8);
    47464747    end
    47474748    set(handles.ListObject,'Value',1)
    4748 %     set(handles.ListObject,'Max',1)
    47494749end
    47504750
Note: See TracChangeset for help on using the changeset viewer.