- Timestamp:
- Jan 17, 2025, 10:47:01 PM (3 weeks ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_file_info.m
r1165 r1170 127 127 FileInfo.BitDepth=BitmapInfoHeader.biBitCount; 128 128 FileInfo.TimeName='video'; 129 case '.hcc' 130 %cd 'TelopsToolbox_20230707(r20340)' 131 installToolboxIRCAM 132 [~,InfoArray]=readIRCam(fileinput,'HeadersOnly',true); 133 FileInfo.FileType='telopsIR'; 134 FileInfo.Height=InfoArray(1).Height; 135 FileInfo.Width=InfoArray(1).Width; 136 FileInfo.FrameRate=InfoArray(1).AcquisitionFrameRate; 137 FileInfo.NumberOfFrames=numel(InfoArray); 138 FileInfo.TimeName='video'; 129 139 otherwise 130 140 if ~isempty(FileExt)% exclude empty extension … … 253 263 FileInfo.FieldType=FileInfo.FileType;%default 254 264 switch FileInfo.FileType 255 case {'image','multimage','video','mmreader','rdvision','image_DaVis','cine_phantom' }265 case {'image','multimage','video','mmreader','rdvision','image_DaVis','cine_phantom','telopsIR'} 256 266 FileInfo.FieldType='image'; 257 267 case {'civx','civdata','pivdata_fluidimage'} -
trunk/src/read_field.m
r1162 r1170 239 239 A=read(ParamOut,frame_index); 240 240 end 241 case 'telopsIR' 242 [A,Header]=readIRCam(FileName,'Frames',frame_index); 243 A=(reshape(A,Header(1).Width,Header(1).Height))'; 244 A=flip(A,1); 241 245 case 'mmreader' 242 246 if isa(ParamIn,'mmreader') -
trunk/src/read_image.m
r1127 r1170 79 79 A=Input.Frames{num}.Components{1}.Planes{1}'; 80 80 end 81 case 'telopsIR' 82 [A,Header]=readIRCam(FileName,'Frames',num); 83 A=(reshape(A,Header(1).Width,Header(1).Height))'; 84 A=flip(A,1); 81 85 end -
trunk/src/series.m
r1168 r1170 140 140 end 141 141 if exist(xmlfile,'file') 142 SeriesData .SeriesParam=xml2struct(xmlfile);143 if ~(isfield(SeriesData .SeriesParam,'ClusterParam')&& isfield(SeriesData.SeriesParam.ClusterParam,'LaunchCmdFcn'))142 SeriesData=xml2struct(xmlfile); 143 if ~(isfield(SeriesData,'ClusterParam')&& isfield(SeriesData.ClusterParam,'LaunchCmdFcn')) 144 144 [success,message]=copyfile(xmlfile,fullfile(path_series,'series_old.xml'));% update the file series.xml inot correctly documented 145 145 delete(xmlfile); 146 146 [success,message]=copyfile(fullfile(path_series,'series.xml.default'),xmlfile); 147 147 end 148 SeriesData .SeriesParam=xml2struct(xmlfile);148 SeriesData=xml2struct(xmlfile); 149 149 end 150 150 … … 160 160 ActionPathList(:)={path_series_fct}; % set the default path to series fcts to all list members 161 161 RunModeList={'local';'background'}; % default choice of extensions (Matlab fct .m or compiled version .sh) 162 [s,w]=system(SeriesData.SeriesParam.ClusterParam.ExistenceTest); % look for cluster system presence 162 if isfield(SeriesData.ClusterParam.ExistenceTest,'Text') 163 oarcommand=SeriesData.ClusterParam.ExistenceTest.Text; 164 else 165 oarcommand=SeriesData.ClusterParam.ExistenceTest; 166 end 167 [s,w]=system(oarcommand); % look for cluster system presence 163 168 if isequal(s,0) 164 169 RunModeList=[RunModeList;{'cluster'}]; … … 1533 1538 % case 'cluster' 1534 1539 % %proposed number of cores to reserve in the cluster 1535 % NbCoreAdvised=SeriesData. SeriesParam.ClusterParam.NbCoreAdvised;1536 % NbCoreMax=min(NbProcess,SeriesData. SeriesParam.ClusterParam.NbCoreMax);1540 % NbCoreAdvised=SeriesData.ClusterParam.NbCoreAdvised; 1541 % NbCoreMax=min(NbProcess,SeriesData.ClusterParam.NbCoreMax); 1537 1542 % if NbCoreMax~=1 1538 1543 % if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) … … 1824 1829 Param.Action.CPUTime=CPUTime; 1825 1830 end 1826 JobNumberMax=SeriesData. SeriesParam.ClusterParam.JobNumberMax;1827 JobCPUTimeAdvised=SeriesData. SeriesParam.ClusterParam.JobCPUTimeAdvised;1831 JobNumberMax=SeriesData.ClusterParam.JobNumberMax; 1832 JobCPUTimeAdvised=SeriesData.ClusterParam.JobCPUTimeAdvised; 1828 1833 if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined 1829 1834 BlockLength= ceil(JobCPUTimeAdvised/(CPUTime*nbfield_j)); % iterations are grouped in sets with length BlockLength such that the typical CPU time of a job is JobCPUTimeAdvised. … … 1835 1840 1836 1841 % %proposed number of cores to reserve in the cluster 1837 NbCoreAdvised=SeriesData. SeriesParam.ClusterParam.NbCoreAdvised;1838 NbCoreMax=min(NbProcess,SeriesData. SeriesParam.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes1842 NbCoreAdvised=SeriesData.ClusterParam.NbCoreAdvised; 1843 NbCoreMax=min(NbProcess,SeriesData.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes 1839 1844 if NbCoreMax~=1 1840 1845 if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled) … … 2101 2106 end 2102 2107 CPUTimeProcess=CPUTime*BlockLength*nbfield_j; % estimated CPU time for one individual process (in minutes) 2103 LaunchCmdFcn=SeriesData. SeriesParam.ClusterParam.LaunchCmdFcn;% command obtained from the function2108 LaunchCmdFcn=SeriesData.ClusterParam.LaunchCmdFcn;% command obtained from the function 2104 2109 oar_command=feval(LaunchCmdFcn,ListProcess,ActionFullName,DirLog,NbProcess, NbCore,CPUTimeProcess) 2105 2110 [status,result]=system(oar_command)% execute system command and show the result (ID number of the launched job) on the Matlab command window … … 2632 2637 end 2633 2638 end 2634 2635 % status_j='on'; % default2636 % if isfield(SeriesData,'j1_series') && isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)) % case of empty j indices2637 % status_j='off'; % no j index needed2638 % elseif strcmp(get(handles.PairString,'Visible'),'on')2639 % check_burst=cellfun(@isempty,regexp(get(handles.PairString,'Data'),'^j')); % =0 for burst case, 1 otherwise2640 % if isempty(find(check_burst, 1))% if all pair string begins by j (burst)2641 % status_j='off'; % no j index needed for bust case2642 % end2643 % end2644 % enable_j(handles,status_j) % no j index needed2645 % if isfield(ParamOut,'j_index_1')&& isfield(ParamOut,'j_index_2')%strcmp(ParamOut.Desable_j_index,'on')2646 % %status_j='off';2647 % set(handles.num_first_j,'String',num2str(ParamOut.j_index_1))2648 % set(handles.num_last_j,'String',num2str(ParamOut.j_index_2))2649 % % set(handles.num_first_j,'enable','off')2650 % % set(handles.num_last_j,'enable','off')2651 % set(handles.num_first_j,'visible','off')2652 % set(handles.num_last_j,'visible','off')2653 % set(handles.num_incr_j,'visible','off')2654 % else2655 % set(handles.num_first_j,'visible','on')2656 % set(handles.num_last_j,'visible','on')2657 % set(handles.num_incr_j,'visible',status_j)2658 % end2659 2639 2660 2640 %% NbSlice visibility … … 3963 3943 function DiskQuota_Callback(hObject, eventdata, handles) 3964 3944 SeriesData=get(handles.series,'UserData'); 3965 system(SeriesData. SeriesParam.DiskQuotaCmd)3945 system(SeriesData.DiskQuotaCmd) 3966 3946 3967 3947 -
trunk/src/series/civ_input.m
r1169 r1170 877 877 ref_j=[]; 878 878 if isequal(mode_selected,'pair j1-j2')%|isequal(mode,'st_pair j1-j2') 879 ref_j=0; 879 ref_j=0; 880 MinIndex_j=str2num(get(handles.MinIndex_j,'String')); 881 MaxIndex_j=str2num(get(handles.MaxIndex_j,'String')); 882 if MaxIndex_j-MinIndex_j>10 883 mode_selected= 'series(Dj)'; 884 ref_j= str2double(get(handles.ref_j,'String')); 885 end 880 886 elseif strcmp(get(handles.ref_j,'Visible'),'on') 881 887 ref_j=str2double(get(handles.ref_j,'String')); … … 935 941 end 936 942 case 'pair j1-j2'%case of pairs 937 MinIndex_j=str2num(get(handles.MinIndex_j,'String')); 938 MaxIndex_j=str2num(get(handles.MaxIndex_j,'String')); 943 % MinIndex_j=str2num(get(handles.MinIndex_j,'String')); 944 % MaxIndex_j=str2num(get(handles.MaxIndex_j,'String')); 945 % if MaxIndex_j-MinIndex_j>10 946 % disp('too many pairs, switch to mode series(Dj)') 947 % return 948 % end 939 949 index_pair=0; 940 950 %get all the Time intervals in bursts -
trunk/src/series/civ_series.m
r1169 r1170 73 73 Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar) 74 74 Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1) 75 if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices') && strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')75 if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices') && isequal(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2') 76 76 Data.IndexRange_j='off';%no j index display in series 77 77 else … … 346 346 [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A); 347 347 FileType_A=FileInfo_A.FileType; 348 if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom' }), 1))% case of video input349 Time=zeros(FileInfo_A.NumberOfFrames+1,2); 348 if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom','telopsIR'}), 1))% case of video input 349 Time=zeros(FileInfo_A.NumberOfFrames+1,2); 350 350 Time(:,2)=(0:1/FileInfo_A.FrameRate:(FileInfo_A.NumberOfFrames)/FileInfo_A.FrameRate)'; 351 if ~isempty(j1_series_Civ1) && j1_series_Civ1~=1 352 Time=Time'; 353 end 351 354 end 352 355 if ~isempty(FileType_A) && isempty(Time)% Time = index i +0.001 index j by default
Note: See TracChangeset
for help on using the changeset viewer.