PlusLib  2.9.0
Software library for tracked ultrasound image acquisition, calibration, and processing.
ReadTrackerLag.m
Go to the documentation of this file.
1 function [isValid, trackerLag, calibrationError, maxCalibrationError] = ReadTrackerLag(rootFolder)
2 
3 cd(rootFolder);
4 av_files = dir();
6 isValid = false;
7 
8 trackerLagFilename = 'TemporalCalibrationResults.xml';
9 
10 for i = 1 : length(av_files)
11  if(~isempty(strfind(av_files(i).name, trackerLagFilename)))
12  TrackerFileName = av_files(i).name;
13  isValid = true;
14  break;
15  end
16 end
17 
18 if(isValid)
19  xmlstr = fileread(trackerLagFilename);
20  V = xml_parseany(xmlstr);
21  trackerLag = str2num(V.ATTRIBUTE.TrackerLagSec);
22  calibrationError = str2num(V.ATTRIBUTE.CalibrationError);
23  maxCalibrationError = str2num(V.ATTRIBUTE.MaxCalibrationError);
24 end
25 
26 
27 
28 
29 
30 
trackerLag
Definition: ReadTrackerLag.m:5
calibrationError
trackerLagFilename
Definition: ReadTrackerLag.m:8
for i
av_files
Definition: ReadTrackerLag.m:4
xmlstr
rootFolder
isValid
Definition: ReadTrackerLag.m:6
maxCalibrationError