Commit c81821d1 authored by Jay's avatar Jay
Browse files

v1.14.4

-- Add ability for ProcStreamEditGUI to be able to load and save the user parameter values to the processing stream config file. Prior to this only the defaults were loaded and saved ignoring actual param values.

-- Another improvement to the FuncCallClass.Decode method to be more robust by being able to decode function call string with no input arguments.

-- Update ToDoNotes.txt with to do stuff from the 2019 fnirs course.
parent 1c848c2b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -21,5 +21,11 @@ classdef ArgClass < matlab.mixin.Copyable
            end
        end
        
        
        % ----------------------------------------------------------------------------------
        function str = Encode(obj)
            str = obj.str;
        end
 
    end
end
 No newline at end of file
+26 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ classdef FuncCallClass < handle
        
        
        % ------------------------------------------------------------
        function name = GetNameUserFriendly(obj)
        function name = GetUsageName(obj)
            name = obj.nameUI;
        end
               
@@ -289,10 +289,13 @@ classdef FuncCallClass < handle
                        if isempty(obj.argIn)
                            obj.argIn = ArgClass();
                        end
                        if length(textstr)<(ii+3)
                        if length(textstr)<(ii+2)
                            continue
                        end
                        obj.argOut.str = textstr{ii+2};
                        if length(textstr)<(ii+3)
                            continue
                        end
                        obj.argIn.str = textstr{ii+3};
                        obj.DecodeArgIn();
                        flag = 3;
@@ -314,6 +317,9 @@ classdef FuncCallClass < handle
                                textstr{ii+1}(jj) = ' ';
                            end
                        end
                        if length(textstr)<(ii+2)
                            continue
                        end
                        pformat = textstr{ii+1};
                        for jj = 1:length(textstr{ii+2})
                            if textstr{ii+2}(jj)=='_'
@@ -347,6 +353,24 @@ classdef FuncCallClass < handle
            %   
            %         '@ hmrBandpassFilt dod (dod,t hpf %0.3f 0.01 lpf %0.2f 0.5'
            %
                                    
            % Encode params str
            paramInStr = '';
            for ii=1:length(obj.paramIn)
                if ii<length(obj.paramIn)
                    space = ' ';
                else
                    space = '';
                end
                if isempty(paramInStr)
                    paramInStr = sprintf('%s%s', obj.paramIn(ii).Encode(), space);
                else
                    paramInStr = sprintf('%s%s%s', paramInStr, obj.paramIn(ii).Encode(), space);
                end
            end
                        
            obj.encodedStr = sprintf('@ %s %s %s %s', obj.name, obj.argOut.Encode(), obj.argIn.Encode(), paramInStr);
                
            fcallStrEncoded = obj.encodedStr;
        end
        
+31 −0
Original line number Diff line number Diff line
@@ -81,6 +81,37 @@ classdef ParamClass < matlab.mixin.Copyable
            val = obj.name;
        end
        
        % ----------------------------------------------------------------------------------
        function val = GetValue(obj)
            val = obj.value;
        end
        
        % ----------------------------------------------------------------------------------
        function val = GetFormat(obj)
            val = obj.format;
        end
        
        % ----------------------------------------------------------------------------------
        function str = Encode(obj)
            str = '';
            formatarr =  str2cell(obj.format,' ');
            if length(obj.value) ~= length(formatarr)
                return
            end
            formatstr =  '';
            valuestr = '';
            for ii=1:length(obj.value)
                if ii<2
                    formatstr = formatarr{ii};
                    valuestr = num2str(obj.value(ii));
                else
                    formatstr = sprintf('%s_%s', formatstr, formatarr{ii});
                    valuestr = sprintf('%s_%s', valuestr, num2str(obj.value(ii)));                    
                end
            end
            str = sprintf('%s %s %s', obj.name, formatstr, valuestr);
        end
        
    end
end
+1 −1
Original line number Diff line number Diff line
@@ -490,7 +490,7 @@ classdef ProcStreamClass < handle
        function maxnamelen = GetMaxCallNameLength(obj)
            maxnamelen = 0;
            for iFcall = 1:length(obj.fcalls)
                if length(obj.fcalls(iFcall).GetNameUserFriendly()) > maxnamelen
                if length(obj.fcalls(iFcall).GetUsageName()) > maxnamelen
                    maxnamelen = length(obj.fcalls(iFcall).nameUI)+1;
                end
            end
+12 −0
Original line number Diff line number Diff line
@@ -96,3 +96,15 @@ Apr 21, 2019
-- Generate dc and dod timecourses on the fly using active proc stream function when starting Homer3 to avoid having to save this in groupResults.mat. In order to save costly memory usage. 


==========================
Nov 6, 2019

Notes from fnirs course 2019

-- Homer3 gets matlab exception in folder which has no write permissions. Need to have a workaround for this. 
-- Label units in MainGUI data axes window
-- Add units to SDG axes 
-- Generate SD file from Homer3


Loading