Changeset 476 for trunk/src/civ.m


Ignore:
Timestamp:
Jun 25, 2012, 10:50:51 AM (12 years ago)
Author:
sommeria
Message:

bugs corrected +
* filter parameter multiplied by 1000 in filter_tps*

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r469 r476  
    356356    elseif ~isempty(Data.absolut_time_T0')% case of  civx data,
    357357        set(handles.Program,'Value',1) %select Cix by default
    358         ListProgram_Callback([],[], handles)
     358        Program_Callback([],[], handles)
    359359        if ~isempty(Data.fix2)
    360360            ind_opening=5;
     
    423423set(handles.RootFile,'String',RootFile)
    424424if strcmp(ExtInput,'.nc')
    425     SubDirCiv=regexprep(SubDir,[SuddirImages '^'],'');%suppress the root  SuddirImages;
     425    SubDirCiv=regexprep(SubDir,[SubdirImages '^'],'');%suppress the root  SuddirImages;
    426426else
    427427    SubDirCiv= '.civ';
     
    449449
    450450%% look for an image documentation file
    451 XmlFileName=find_imadoc(RootPath,SubDir,RootFile,FileExt);
     451XmlFileName=find_imadoc(RootPath,SubDir,RootFile,ImaExt);
    452452% SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.'
    453453% filexml=fullfile(RootPath,[SubDirBase '.xml']);% new convention: xml above the image dir
     
    482482    [XmlData,warntext]=imadoc2struct(XmlFileName);
    483483    nom_type_read=[];
    484     if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file
    485         [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);
    486         fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file,
    487         if ~exist(fullname,'file')
    488             msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist'])
    489         end
    490     end
     484%     if isfield(XmlData,'Heading')&&isfield(XmlData.Heading','ImageName')&&ischar(XmlData.Heading.ImageName)% get image nom type and extension from the xml file
     485%         [~,tild,tild,tild,tild,tild,tild,tild,nom_type_read]=fileparts_uvmat(XmlData.Heading.ImageName);
     486%         fullname=fullfile(fileparts(RootName),XmlData.Heading.ImageName); %full name (including path) of the first image defined by the xmle file,
     487%         if ~exist(fullname,'file')
     488%             msgbox_uvmat('WARNING',['FirstImage ' fullname ' defined in the xml file does not exist'])
     489%         end
     490%     end
    491491    if isfield(XmlData,'Time') && ~isempty(XmlData.Time)
    492492        time=XmlData.Time;
     
    11831183    end
    11841184    if Param.CheckCiv2
    1185         [Param.Civ2.FileTypeA,FileInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1});
    1186         [Param.Civ2.FileTypeB,FileInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1});
     1185        [Param.Civ2.FileTypeA,ImageInfoA_civ2,Param.Civ2.ImageA]=get_file_type(filecell.ima1.civ2{1});
     1186        [Param.Civ2.FileTypeB,ImageInfoB_civ2,Param.Civ2.ImageB]=get_file_type(filecell.ima2.civ2{1});
    11871187    end
    11881188% end
     
    12061206
    12071207        if Param.CheckCiv1
    1208             % read image-dependent parameters
    1209            
     1208            % read image-dependent parameters         
    12101209            if ~checkframe% && size(time,1)>=i2_civ1(ifile) && size(time,2)>=j2_civ1(j)
    12111210                Param.Civ1.Dt=(time(i2_civ1(ifile)+1,j2_civ1(j)+1)-time(i1_civ1(ifile)+1,j1_civ1(j)+1));
     
    12201219            Param.Civ1.ImageA=filecell.ima1.civ1{ifile,j};
    12211220            Param.Civ1.ImageB=filecell.ima2.civ1{ifile,j};
    1222             Param.Civ1.ImageBitDepth=FileInfoA_civ1.BitDepth;
    1223             Param.Civ1.ImageWidth=FileInfoA_civ1.Width;
    1224             Param.Civ1.ImageHeight=FileInfoA_civ1.Height;
     1221            Param.Civ1.ImageBitDepth=ImageInfoA_civ1.BitDepth;
     1222            Param.Civ1.ImageWidth=ImageInfoA_civ1.Width;
     1223            Param.Civ1.ImageHeight=ImageInfoA_civ1.Height;
    12251224            Param.Civ1.FrameIndexA=i1_civ1(ifile);
    12261225            Param.Civ1.FrameIndexB=i2_civ1(ifile);
     
    12941293            end
    12951294
    1296             Param.Civ2.ImageBitDepth=FileInfoA_civ2.BitDepth;
    1297             Param.Civ2.ImageWidth=FileInfoA_civ2.Width;
    1298             Param.Civ2.ImageHeight=FileInfoA_civ2.Height;
     1295            Param.Civ2.ImageBitDepth=ImageInfoA_civ2.BitDepth;
     1296            Param.Civ2.ImageWidth=ImageInfoA_civ2.Width;
     1297            Param.Civ2.ImageHeight=ImageInfoA_civ2.Height;
    12991298            Param.Civ2.FrameIndexA=i1_civ2(ifile);
    13001299            Param.Civ2.FrameIndexB=i2_civ2(ifile);           
     
    14991498            else
    15001499                for p=1:length(batch_file_list)
    1501                     fid=fopen( batch_file_list{p});
     1500%                     civ_matlab([batch_file_list{p} '.xml'], [batch_file_list{p} '.nc'])
     1501                    fid=fopen(batch_file_list{p});
    15021502                    eval(fscanf(fid,'%s'));
    15031503                    fclose(fid);
Note: See TracChangeset for help on using the changeset viewer.