Ignore:
Timestamp:
Jan 20, 2017, 5:17:25 PM (4 years ago)
Author:
sommeria
Message:

image with vectors fixed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/stereo_civ.m

    r984 r985  
    9292end
    9393[tild,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
     94time=[];
    9495for iview=1:size(Param.InputTable,1)
    9596    XmlFileName=find_imadoc(Param.InputTable{iview,1},Param.InputTable{iview,2},Param.InputTable{iview,3},Param.InputTable{iview,5});
     
    135136i2_series_Civ1=i1_series{2};i2_series_Civ2=i1_series{2};
    136137if isempty(j1_series{1})
     138        FrameIndex_A_Civ1=i1_series_Civ1;
     139    FrameIndex_B_Civ1=i2_series_Civ1;
    137140    j1_series_Civ1=ones(size(i1_series{1}));
    138141    j2_series_Civ1=ones(size(i1_series{2}));
     
    140143    j1_series_Civ1=j1_series{1};
    141144    j2_series_Civ1=j1_series{2};
     145     FrameIndex_A_Civ1=j1_series_Civ1;
     146    FrameIndex_B_Civ1=j2_series_Civ1;
    142147end
    143148j1_series_Civ2=j1_series_Civ1;
    144149j2_series_Civ2=j2_series_Civ1;
    145 NomTypeNc=NomType_A;
    146 if isempty(j1_series_Civ1)
    147     FrameIndex_A_Civ1=i1_series_Civ1;
    148     FrameIndex_B_Civ1=i2_series_Civ1;
    149     j1_series_Civ1=ones(size(i1_series_Civ1));
    150     j2_series_Civ1=ones(size(i1_series_Civ1));
    151 else
    152     FrameIndex_A_Civ1=j1_series_Civ1;
    153     FrameIndex_B_Civ1=j2_series_Civ1;
    154 end
     150
     151% if isempty(j1_series_Civ1)
     152%     FrameIndex_A_Civ1=i1_series_Civ1;
     153%     FrameIndex_B_Civ1=i2_series_Civ1;
     154%     j1_series_Civ1=ones(size(i1_series_Civ1));
     155%     j2_series_Civ1=ones(size(i1_series_Civ1));
     156% else
     157%     FrameIndex_A_Civ1=j1_series_Civ1;
     158%     FrameIndex_B_Civ1=j2_series_Civ1;
     159% end
    155160if isempty(PairCiv2)
    156161    FrameIndex_A_Civ2=FrameIndex_A_Civ1;
     
    231236    end
    232237end
    233 
     238if ismember(FileType_A,{'mmreader','video','cine_phantom'})
     239    NomTypeNc='_1';
     240else
     241    NomTypeNc=NomType_A;
     242end
    234243
    235244%% Output directory
     
    244253
    245254%% get timing from input video
    246 if isempty(time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom'})))% case of video input
     255if isempty(time) && ismember(FileType_A,{'mmreader','video','cine_phantom'})% case of video input
    247256    time=zeros(FileInfo_A.NumberOfFrames+1,2);
    248257    time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)';
     
    281290    Civ1Dir=OutputDir;
    282291
    283         ncfile=fullfile_uvmat(RootPath_A,Civ1Dir,[RootFile_A,'_All'],'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
    284             j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    285        
    286        
    287         ncfile2=fullfile_uvmat(RootPath_A,Civ1Dir,[RootFile_A,'_Light'],'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
     292%         ncfile=fullfile_uvmat(RootPath_A,Civ1Dir,[RootFile_A,'_All'],'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
     293%             j1_series_Civ1(ifield),j2_series_Civ1(ifield));
     294       
     295       
     296        ncfile2=fullfile_uvmat(RootPath_A,Civ1Dir,RootFile_A,'.nc',NomTypeNc,i2_series_Civ1(ifield),[],...
    288297            j1_series_Civ1(ifield),j2_series_Civ1(ifield));
    289298       
     
    824833   
    825834    %% write result in a netcdf file if requested
    826     if LSM ~= 1 % store all data
    827         if exist('ncfile','var')
    828             errormsg=struct2nc(ncfile,Data);
    829             if isempty(errormsg)
    830                 disp([ncfile ' written'])
    831             else
    832                 disp(errormsg)
    833             end
    834         end
    835     else
     835%     if LSM ~= 1 % store all data
     836%         if exist('ncfile','var')
     837%             errormsg=struct2nc(ncfile,Data);
     838%             if isempty(errormsg)
     839%                 disp([ncfile ' written'])
     840%             else
     841%                 disp(errormsg)
     842%             end
     843%         end
     844%     else
    836845       % store only phys data
    837846        Data_light.ListVarName={'Xphys','Yphys','Zphys','Civ3_C','Xmid','Ymid','Uphys','Vphys','Error'};
     
    856865       end
    857866       
    858     end
     867%     end
    859868end
    860869disp(['ellapsed time for the loop ' num2str(toc) ' s'])
Note: See TracChangeset for help on using the changeset viewer.