7 #ifndef _TEMPORAL_CALIBRATION_H 8 #define _TEMPORAL_CALIBRATION_H 10 #include "PlusConfigure.h" 11 #include "vtkPlusCalibrationExport.h" 15 #include "vtkObject.h" 18 class vtkPiecewiseFunction;
84 PlusStatus ReadConfiguration(vtkXMLDataElement* aConfig);
87 void SetSamplingResolutionSec(
double samplingResolutionSec);
90 void SetFixedFrames(vtkIGSIOTrackedFrameList* frameList,
FRAME_TYPE frameType);
93 void SetFixedProbeToReferenceTransformName(
const std::string& probeToReferenceTransformName);
100 void SetMovingFrames(vtkIGSIOTrackedFrameList* frameList,
FRAME_TYPE frameType);
103 void SetMovingProbeToReferenceTransformName(
const std::string& probeToReferenceTransformName);
106 void SetMaximumMovingLagSec(
double maxLagSec);
109 void SetSaveIntermediateImages(
bool saveIntermediateImages);
111 void SetIntermediateFilesOutputDirectory(
const std::string& outputDirectory);
113 void SetVideoClipRectangle(
int* clipRectOriginIntVec,
int* clipRectSizeIntVec);
114 std::vector<int> GetVideoClipRectangle()
const;
131 PlusStatus GetCalibrationError(
double& error);
133 PlusStatus GetUncalibratedMovingPositionSignal(vtkTable* unCalibratedMovingPositionSignal);
134 PlusStatus GetCalibratedMovingPositionSignal(vtkTable* calibratedMovingPositionSignal);
135 PlusStatus GetFixedPositionSignal(vtkTable* fixedPositionSignal);
136 PlusStatus GetCorrelationSignal(vtkTable* correlationSignal);
137 PlusStatus GetCorrelationSignalFine(vtkTable* correlationSignal);
139 PlusStatus GetBestCorrelation(
double& videoCorrelation);
145 PlusStatus GetSignalRange(
const std::deque<double>& signal,
int startIndex,
int stopIndex,
double& minValue,
double& maxValue);
150 PlusStatus NormalizeMetricValues(std::deque<double>& signal,
double& normalizationFactor,
int startIndex = 0,
int stopIndex = -1);
151 PlusStatus NormalizeMetricValues(std::deque<double>& signal,
double& normalizationFactor,
double startTime,
double stopTime,
const std::deque<double>& timestamps);
152 void ComputeCorrelationBetweenFixedAndMovingSignal(
double minTrackerLagSec,
double maxTrackerLagSec,
double stepSizeSec,
double& bestCorrelationValue,
double& bestCorrelationTimeOffset,
double& bestCorrelationNormalizationFactor, std::deque<double>& corrTimeOffsets, std::deque<double>& corrValues);
154 double ComputeAlignmentMetric(
const std::deque<double>& signalA,
const std::deque<double>& signalB);
158 PlusStatus ResampleSignalLinearly(
const std::deque<double>& templateSignalTimestamps,
const vtkSmartPointer<vtkPiecewiseFunction>& signalFunction, std::deque<double>& resampledSignalValues);
212 int LineSegmentationClipRectangleOrigin[2];
215 int LineSegmentationClipRectangleSize[2];
223 #endif // _TEMPORAL_CALIBRATION_H double signalTimeRangeMin
double BestCorrelationTimeOffset
std::string probeToReferenceTransformName
double BestCorrelationValue
std::deque< double > signalTimestamps
bool SaveIntermediateImages
std::deque< double > CorrelationValuesFine
double signalTimeRangeMax
std::deque< double > signalValues
std::deque< double > normalizedSignalValues
PlusStatus ConstructTableSignal(std::deque< double > &x, std::deque< double > &y, vtkTable *table)
std::deque< double > CorrelationValues
double MaxCalibrationError
double SamplingResolutionSec
vtkIGSIOTrackedFrameList * frameList
Computes the time lag between tracking streams or between a tracking and an ultrasound image stream.
std::string IntermediateFilesOutputDirectory
std::deque< double > CorrelationTimeOffsets
std::deque< double > normalizedSignalTimestamps
TEMPORAL_CALIBRATION_ERROR
double BestCorrelationLagIndex
std::deque< double > CalibrationErrorVector
double FixedSignalValuesNormalizationFactor
double BestCorrelationNormalizationFactor
std::deque< double > CorrelationTimeOffsetsFine
Direction vectors of rods y