Changeset 1170 for trunk


Ignore:
Timestamp:
Jan 17, 2025, 10:47:01 PM (3 weeks ago)
Author:
sommeria
Message:

Library Teleops infrared camera added

Location:
trunk/src
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_file_info.m

    r1165 r1170  
    127127        FileInfo.BitDepth=BitmapInfoHeader.biBitCount;
    128128        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';
    129139    otherwise
    130140        if ~isempty(FileExt)% exclude empty extension
     
    253263FileInfo.FieldType=FileInfo.FileType;%default
    254264switch 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'}
    256266        FileInfo.FieldType='image';
    257267    case {'civx','civdata','pivdata_fluidimage'}
  • trunk/src/read_field.m

    r1162 r1170  
    239239            A=read(ParamOut,frame_index);
    240240        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);
    241245    case 'mmreader'
    242246        if isa(ParamIn,'mmreader')
  • trunk/src/read_image.m

    r1127 r1170  
    7979        A=Input.Frames{num}.Components{1}.Planes{1}';
    8080                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);
    8185end
  • trunk/src/series.m

    r1168 r1170  
    140140end
    141141if 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'))
    144144        [success,message]=copyfile(xmlfile,fullfile(path_series,'series_old.xml'));% update the file series.xml inot correctly documented
    145145        delete(xmlfile);
    146146        [success,message]=copyfile(fullfile(path_series,'series.xml.default'),xmlfile);
    147147    end
    148     SeriesData.SeriesParam=xml2struct(xmlfile);
     148    SeriesData=xml2struct(xmlfile);
    149149end
    150150
     
    160160ActionPathList(:)={path_series_fct}; % set the default path to series fcts to all list members
    161161RunModeList={'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
     162if isfield(SeriesData.ClusterParam.ExistenceTest,'Text')
     163    oarcommand=SeriesData.ClusterParam.ExistenceTest.Text;
     164else
     165    oarcommand=SeriesData.ClusterParam.ExistenceTest;
     166end
     167[s,w]=system(oarcommand); % look for cluster system presence
    163168if isequal(s,0)
    164169    RunModeList=[RunModeList;{'cluster'}];
     
    15331538%     case 'cluster'
    15341539%         %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);
    15371542%         if NbCoreMax~=1
    15381543%             if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
     
    18241829                Param.Action.CPUTime=CPUTime;
    18251830            end
    1826             JobNumberMax=SeriesData.SeriesParam.ClusterParam.JobNumberMax;
    1827             JobCPUTimeAdvised=SeriesData.SeriesParam.ClusterParam.JobCPUTimeAdvised;
     1831            JobNumberMax=SeriesData.ClusterParam.JobNumberMax;
     1832            JobCPUTimeAdvised=SeriesData.ClusterParam.JobCPUTimeAdvised;
    18281833            if isempty(Param.IndexRange.NbSlice)% if NbSlice is not defined
    18291834                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.
     
    18351840
    18361841            %         %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 processes
     1842            NbCoreAdvised=SeriesData.ClusterParam.NbCoreAdvised;
     1843            NbCoreMax=min(NbProcess,SeriesData.ClusterParam.NbCoreMax);% reduces the number of cores if it exceeds the number of processes
    18391844            if NbCoreMax~=1
    18401845                if strcmp(ActionExt,'.m')% case of Matlab function (uncompiled)
     
    21012106            end
    21022107            CPUTimeProcess=CPUTime*BlockLength*nbfield_j; % estimated CPU time for one individual process (in minutes)
    2103             LaunchCmdFcn=SeriesData.SeriesParam.ClusterParam.LaunchCmdFcn;% command obtained from the function
     2108            LaunchCmdFcn=SeriesData.ClusterParam.LaunchCmdFcn;% command obtained from the function
    21042109            oar_command=feval(LaunchCmdFcn,ListProcess,ActionFullName,DirLog,NbProcess, NbCore,CPUTimeProcess)
    21052110            [status,result]=system(oar_command)% execute system command and show the result (ID number of the launched job) on the Matlab command window
     
    26322637    end
    26332638end
    2634 
    2635 % status_j='on'; % default
    2636 % if isfield(SeriesData,'j1_series') && isempty(find(~cellfun(@isempty,SeriesData.j1_series), 1)) % case of empty j indices
    2637 %     status_j='off'; % no j index needed
    2638 % elseif strcmp(get(handles.PairString,'Visible'),'on')
    2639 %     check_burst=cellfun(@isempty,regexp(get(handles.PairString,'Data'),'^j')); % =0 for burst case, 1 otherwise
    2640 %     if isempty(find(check_burst, 1))% if all pair string begins by j (burst)
    2641 %         status_j='off'; % no j index needed for bust case
    2642 %     end
    2643 % end
    2644 % enable_j(handles,status_j) % no j index needed
    2645 % 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 % else
    2655 %     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 % end
    26592639
    26602640%% NbSlice visibility
     
    39633943function DiskQuota_Callback(hObject, eventdata, handles)
    39643944SeriesData=get(handles.series,'UserData');
    3965 system(SeriesData.SeriesParam.DiskQuotaCmd)
     3945system(SeriesData.DiskQuotaCmd)
    39663946
    39673947
  • trunk/src/series/civ_input.m

    r1169 r1170  
    877877ref_j=[];
    878878if 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
    880886elseif strcmp(get(handles.ref_j,'Visible'),'on')
    881887    ref_j=str2double(get(handles.ref_j,'String'));
     
    935941        end
    936942    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
    939949        index_pair=0;
    940950        %get all the Time intervals in bursts
  • trunk/src/series/civ_series.m

    r1169 r1170  
    7373    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
    7474    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')
    7676        Data.IndexRange_j='off';%no j index display in series
    7777    else
     
    346346                    [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
    347347                    FileType_A=FileInfo_A.FileType;
    348                     if isempty(Time) && ~isempty(find(strcmp(FileType_A,{'mmreader','video','cine_phantom'}), 1))% case of video input
    349                         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);                 
    350350                        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
    351354                    end
    352355                    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.