Skip to content

Commit

Permalink
Added file that was missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Shrediquette committed Jun 13, 2024
1 parent a36e230 commit 96677bf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions +plot/measureDistance_events.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
function measureDistance_events(src,evt)
evname = evt.EventName;
handles=gui.gethand;
switch(evname)
case{'MovingROI'}
roirect = round(src.Position); %Position of the ROI, specified as a 2-by-2 numeric matrix of the form [x1 y1; x2 y2]. Each row specifies the respective end-point of the line segment.
calxy=gui.retr('calxy');
xposition=[roirect(1,1) roirect(2,1)];
yposition=[roirect(1,2) roirect(2,2)];
deltax=abs(xposition(1,1)-xposition(1,2));
deltay=abs(yposition(1,1)-yposition(1,2));
length=sqrt(deltax^2+deltay^2);
alpha=(180/pi) *(acos(deltax/length));
beta=(180/pi) *(asin(deltax/length));
%src.Label = ['x: ' num2str(roirect(1)*calxy) ' y: ' num2str(roirect(2)*calxy) ' w: ' num2str(roirect(3)) ' h: ' num2str(roirect(4))];
if (gui.retr('calu')==1 || gui.retr('calu')==-1) && gui.retr('calxy')==1
set (handles.deltax, 'String', [num2str(deltax*calxy) ' [px]']);
set (handles.deltay, 'String', [num2str(deltay*calxy) ' [px]']);
set (handles.length, 'String', [num2str(length*calxy) ' [px]']);
else
set (handles.deltax, 'String', [num2str(deltax*calxy) ' [m]']);
set (handles.deltay, 'String', [num2str(deltay*calxy) ' [m]']);
set (handles.length, 'String', [num2str(length*calxy) ' [m]']);
end
set (handles.alpha, 'String', num2str(round(alpha,1)));
set (handles.beta, 'String', num2str(round(beta,1)));
end

Binary file modified PIVlab_settings_default.mat
Binary file not shown.
2 changes: 2 additions & 0 deletions resources/project/Root.type.Files/+plot.type.File.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info/>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<Info>
<Category UUID="FileClassCategory">
<Label UUID="design"/>
</Category>
</Info>

0 comments on commit 96677bf

Please sign in to comment.