From 9476111be95db0f087ee9fe0a925ffe3d6d7f8f6 Mon Sep 17 00:00:00 2001 From: Waddah Moghram Date: Sun, 7 Apr 2019 16:53:09 -0500 Subject: [PATCH] Update calculateMovieDisplacementField.m 1. Corrected matrix dimensions mismatch 2. Added tracking successively. It was forgotten Error Message: ================================================================================= MATLAB Version 9.5.0.1067069 (R2018b) Update 4 MATLAB License Number: 837756 Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 16299) Java VM Version: Java 1.8.0_152-b16 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode Movie 1 - Y:\Waddah\Official TFM Videos 2\Bead 1\Force Control\Force Sequence 175 Gs Run 1 Epi.mat: -- Step 2: Displacement Field Calculation Matrix dimensions must agree. Error in calculateMovieDisplacementField (line 471) currentBeads = [pivData.X(validV), pivData.Y(validV)] + cumulativeV_forBeads; Error in Process/run (line 254) obj.funName_(obj.getOwner(), varargin{:}); Error in packageGUI_RunFcn>userfcn_runProc_dfs (line 633) userData.crtPackage.processes_{procID}.run(); % throws exception Error in packageGUI_RunFcn>start_processing_movies_in_series (line 217) userfcn_runProc_dfs(procID, procRun{iMovie}, handles); % user data is retrieved, updated and submitted Error in packageGUI_RunFcn (line 162) movieException = start_processing_movies_in_series(movieRun,handles,movieException,procRun); Error in packageGUI_OpeningFcn>@(hObject,eventdata)packageGUI_RunFcn(hObject,eventdata,guidata(hObject)) (line 380) set(handles.pushbutton_run, 'Callback', @(hObject,eventdata)packageGUI_RunFcn(hObject,eventdata,guidata(hObject))); Please verify your settings are correct. Feel free to contact us if you have question regarding this error. Please help us improve the software by clearly reporting the scenario when this error occurs, and the above error information to us (error information is also displayed in Matlab command line). For contact information please refer to the following URL: http://www.utsouthwestern.edu/labs/danuser/software/ --- software/calculateMovieDisplacementField.m | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/software/calculateMovieDisplacementField.m b/software/calculateMovieDisplacementField.m index 4670cec..7cc99c0 100644 --- a/software/calculateMovieDisplacementField.m +++ b/software/calculateMovieDisplacementField.m @@ -445,15 +445,16 @@ function calculateMovieDisplacementField(movieData,varargin) [pivData] = pivAnalyzeImagePair(refFrame,currImage,pivData,pivPar); validV = ~isnan(pivData.V); - + + %------ Modified by Waddah I Moghram on 4/7/2019. Added (validV) if ~p.trackSuccessively displField(j).pos=[pivData.X(validV), pivData.Y(validV)]; displField(j).vec=[pivData.U(validV)+residualT(j,2), pivData.V(validV)+residualT(j,1)]; % residual should be added with oppiste order! -SH 072514 else - v2 = [pivData.U, pivData.V]; + v2 = [pivData.U(validV), pivData.V(validV)]; % Added validV by WIM on 4/7/2019 if j== firstFrame - cumulativeV_forV = zeros(size(pivData.U,1),2); - cumulativeV_forBeads = zeros(size(pivData.U,1),2); + cumulativeV_forV = zeros(size(pivData.U(validV),1),2); % Added validV by WIM on 4/7/2019 + cumulativeV_forBeads = zeros(size(pivData.X(validV),1),2); % Added validV by WIM on 4/7/2019 else cumulativeV_forV = cumulativeV_forV+v2; v2(~validV,1)=0; v2(~validV,2)=0; @@ -462,8 +463,11 @@ function calculateMovieDisplacementField(movieData,varargin) currentBeads = [pivData.X(validV), pivData.Y(validV)] + cumulativeV_forBeads; displField(j).pos=[pivData.X(validV), pivData.Y(validV)]; displField(j).vec=[cumulativeV_forV(validV,1)+residualT(j,2) cumulativeV_forV(validV,2)+residualT(j,1)]; % residual should be added with oppiste order! -SH 072514 + + prevImage=currImage; % added by WIM on 4/7/2019 to track frames successively. end - + %------------------------ + % % testing additional pass of piv processing % pivPar.iaSizeX=[ 8]; % pivPar.iaStepX=[ 4]; @@ -527,4 +531,4 @@ function calculateMovieDisplacementField(movieData,varargin) % Close waitbar if ishandle(wtBar), close(wtBar); end -disp('Finished calculating displacement field!') \ No newline at end of file +disp('Finished calculating displacement field!')