Computes the time lag between tracking streams or between a tracking and an ultrasound image stream.
More...
#include <src/PlusCalibration/vtkTemporalCalibrationAlgo/vtkPlusTemporalCalibrationAlgo.h>
|
enum | FRAME_TYPE { FRAME_TYPE_NONE,
FRAME_TYPE_TRACKER,
FRAME_TYPE_VIDEO
} |
|
typedef vtkObject | Superclass |
|
enum | TEMPORAL_CALIBRATION_ERROR {
TEMPORAL_CALIBRATION_ERROR_NONE,
TEMPORAL_CALIBRATION_ERROR_RESULT_ABOVE_THRESHOLD,
TEMPORAL_CALIBRATION_ERROR_INVALID_TRANSFORM_NAME,
TEMPORAL_CALIBRATION_ERROR_NO_TIMESTAMPS,
TEMPORAL_CALIBRATION_ERROR_UNABLE_NORMALIZE_METRIC,
TEMPORAL_CALIBRATION_ERROR_CORRELATION_RESULT_EMPTY,
TEMPORAL_CALIBRATION_ERROR_NO_VIDEO_DATA,
TEMPORAL_CALIBRATION_ERROR_NOT_MF_ORIENTATION,
TEMPORAL_CALIBRATION_ERROR_NOT_ENOUGH_FIXED_FRAMES,
TEMPORAL_CALIBRATION_ERROR_NO_FRAMES_IN_ULTRASOUND_DATA,
TEMPORAL_CALIBRATION_ERROR_SAMPLING_RESOLUTION_TOO_SMALL,
TEMPORAL_CALIBRATION_ERROR_FAILED_COMPUTE_FIXED,
TEMPORAL_CALIBRATION_ERROR_FAILED_COMPUTE_MOVING,
TEMPORAL_CALIBRATION_ERROR_NO_COMMON_TIME_RANGE
} |
|
|
double | ComputeAlignmentMetric (const std::deque< double > &signalA, const std::deque< double > &signalB) |
|
PlusStatus | ComputeCommonTimeRange () |
|
void | ComputeCorrelationBetweenFixedAndMovingSignal (double minTrackerLagSec, double maxTrackerLagSec, double stepSizeSec, double &bestCorrelationValue, double &bestCorrelationTimeOffset, double &bestCorrelationNormalizationFactor, std::deque< double > &corrTimeOffsets, std::deque< double > &corrValues) |
|
PlusStatus | ComputeMovingSignalLagSec (TEMPORAL_CALIBRATION_ERROR &error) |
|
PlusStatus | ComputePositionSignalValues (SignalType &signal) |
|
PlusStatus | ConstructTableSignal (std::deque< double > &x, std::deque< double > &y, vtkTable *table, double timeCorrection) |
|
PlusStatus | GetSignalRange (const std::deque< double > &signal, int startIndex, int stopIndex, double &minValue, double &maxValue) |
|
PlusStatus | NormalizeMetricValues (std::deque< double > &signal, double &normalizationFactor, int startIndex=0, int stopIndex=-1) |
|
PlusStatus | NormalizeMetricValues (std::deque< double > &signal, double &normalizationFactor, double startTime, double stopTime, const std::deque< double > ×tamps) |
|
PlusStatus | ResampleSignalLinearly (const std::deque< double > &templateSignalTimestamps, const vtkSmartPointer< vtkPiecewiseFunction > &signalFunction, std::deque< double > &resampledSignalValues) |
|
Computes the time lag between tracking streams or between a tracking and an ultrasound image stream.
See more infomation in the user documentation.
Definition at line 32 of file vtkPlusTemporalCalibrationAlgo.h.
◆ Superclass
◆ FRAME_TYPE
◆ TEMPORAL_CALIBRATION_ERROR
Enumerator |
---|
TEMPORAL_CALIBRATION_ERROR_NONE | |
TEMPORAL_CALIBRATION_ERROR_RESULT_ABOVE_THRESHOLD | |
TEMPORAL_CALIBRATION_ERROR_INVALID_TRANSFORM_NAME | |
TEMPORAL_CALIBRATION_ERROR_NO_TIMESTAMPS | |
TEMPORAL_CALIBRATION_ERROR_UNABLE_NORMALIZE_METRIC | |
TEMPORAL_CALIBRATION_ERROR_CORRELATION_RESULT_EMPTY | |
TEMPORAL_CALIBRATION_ERROR_NO_VIDEO_DATA | |
TEMPORAL_CALIBRATION_ERROR_NOT_MF_ORIENTATION | |
TEMPORAL_CALIBRATION_ERROR_NOT_ENOUGH_FIXED_FRAMES | |
TEMPORAL_CALIBRATION_ERROR_NO_FRAMES_IN_ULTRASOUND_DATA | |
TEMPORAL_CALIBRATION_ERROR_SAMPLING_RESOLUTION_TOO_SMALL | |
TEMPORAL_CALIBRATION_ERROR_FAILED_COMPUTE_FIXED | |
TEMPORAL_CALIBRATION_ERROR_FAILED_COMPUTE_MOVING | |
TEMPORAL_CALIBRATION_ERROR_NO_COMMON_TIME_RANGE | |
Definition at line 39 of file vtkPlusTemporalCalibrationAlgo.h.
◆ ComputeAlignmentMetric()
double vtkPlusTemporalCalibrationAlgo::ComputeAlignmentMetric |
( |
const std::deque< double > & |
signalA, |
|
|
const std::deque< double > & |
signalB |
|
) |
| |
|
protected |
◆ ComputeCommonTimeRange()
PlusStatus vtkPlusTemporalCalibrationAlgo::ComputeCommonTimeRange |
( |
| ) |
|
|
protected |
◆ ComputeCorrelationBetweenFixedAndMovingSignal()
void vtkPlusTemporalCalibrationAlgo::ComputeCorrelationBetweenFixedAndMovingSignal |
( |
double |
minTrackerLagSec, |
|
|
double |
maxTrackerLagSec, |
|
|
double |
stepSizeSec, |
|
|
double & |
bestCorrelationValue, |
|
|
double & |
bestCorrelationTimeOffset, |
|
|
double & |
bestCorrelationNormalizationFactor, |
|
|
std::deque< double > & |
corrTimeOffsets, |
|
|
std::deque< double > & |
corrValues |
|
) |
| |
|
protected |
◆ ComputeMovingSignalLagSec()
◆ ComputePositionSignalValues()
◆ ConstructTableSignal()
PlusStatus vtkPlusTemporalCalibrationAlgo::ConstructTableSignal |
( |
std::deque< double > & |
x, |
|
|
std::deque< double > & |
y, |
|
|
vtkTable * |
table, |
|
|
double |
timeCorrection |
|
) |
| |
|
protected |
◆ GetBestCorrelation()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetBestCorrelation |
( |
double & |
videoCorrelation | ) |
|
◆ GetCalibratedMovingPositionSignal()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetCalibratedMovingPositionSignal |
( |
vtkTable * |
calibratedMovingPositionSignal | ) |
|
◆ GetCalibrationError()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetCalibrationError |
( |
double & |
error | ) |
|
Returns the calibration error. If the error is large then the computed tracker lag is not reliable. TODO: determine typical acceptable ranges
Definition at line 214 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ GetClassName()
virtual const char* vtkPlusTemporalCalibrationAlgo::GetClassName |
( |
| ) |
|
|
virtual |
◆ GetCorrelationSignal()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetCorrelationSignal |
( |
vtkTable * |
correlationSignal | ) |
|
◆ GetCorrelationSignalFine()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetCorrelationSignalFine |
( |
vtkTable * |
correlationSignal | ) |
|
◆ GetFixedPositionSignal()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetFixedPositionSignal |
( |
vtkTable * |
fixedPositionSignal | ) |
|
◆ GetMaxCalibrationError()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetMaxCalibrationError |
( |
double & |
maxCalibrationError | ) |
|
◆ GetMovingLagSec()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetMovingLagSec |
( |
double & |
lag | ) |
|
Returns the computed time [s] by which the tracker stream lags the video stream. If the lag < 0, the tracker stream leads the video stream. The computed lag corresponds to the time offset that minimizes the difference between the position metric that is computed from the tracker and the video: min( sum(|VideoPositionMetric(t)-TrackerPositionMetric(t+lag)|) )
Definition at line 190 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ GetSignalRange()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetSignalRange |
( |
const std::deque< double > & |
signal, |
|
|
int |
startIndex, |
|
|
int |
stopIndex, |
|
|
double & |
minValue, |
|
|
double & |
maxValue |
|
) |
| |
|
protected |
◆ GetUncalibratedMovingPositionSignal()
PlusStatus vtkPlusTemporalCalibrationAlgo::GetUncalibratedMovingPositionSignal |
( |
vtkTable * |
unCalibratedMovingPositionSignal | ) |
|
◆ GetVideoClipRectangle()
std::vector< int > vtkPlusTemporalCalibrationAlgo::GetVideoClipRectangle |
( |
| ) |
const |
◆ IsA()
virtual int vtkPlusTemporalCalibrationAlgo::IsA |
( |
const char * |
type | ) |
|
|
virtual |
◆ IsTypeOf()
static int vtkPlusTemporalCalibrationAlgo::IsTypeOf |
( |
const char * |
type | ) |
|
|
static |
◆ New()
◆ NormalizeMetricValues() [1/2]
PlusStatus vtkPlusTemporalCalibrationAlgo::NormalizeMetricValues |
( |
std::deque< double > & |
signal, |
|
|
double & |
normalizationFactor, |
|
|
int |
startIndex = 0 , |
|
|
int |
stopIndex = -1 |
|
) |
| |
|
protected |
◆ NormalizeMetricValues() [2/2]
PlusStatus vtkPlusTemporalCalibrationAlgo::NormalizeMetricValues |
( |
std::deque< double > & |
signal, |
|
|
double & |
normalizationFactor, |
|
|
double |
startTime, |
|
|
double |
stopTime, |
|
|
const std::deque< double > & |
timestamps |
|
) |
| |
|
protected |
◆ ReadConfiguration()
PlusStatus vtkPlusTemporalCalibrationAlgo::ReadConfiguration |
( |
vtkXMLDataElement * |
aConfig | ) |
|
◆ ResampleSignalLinearly()
PlusStatus vtkPlusTemporalCalibrationAlgo::ResampleSignalLinearly |
( |
const std::deque< double > & |
templateSignalTimestamps, |
|
|
const vtkSmartPointer< vtkPiecewiseFunction > & |
signalFunction, |
|
|
std::deque< double > & |
resampledSignalValues |
|
) |
| |
|
protected |
◆ SafeDownCast()
◆ SetFixedFrames()
void vtkPlusTemporalCalibrationAlgo::SetFixedFrames |
( |
vtkIGSIOTrackedFrameList * |
frameList, |
|
|
FRAME_TYPE |
frameType |
|
) |
| |
Sets the list of frames and the type of the data set (tracking data, video data, ...) that will be used to compute the "fixed" position signal (usually the video data)
Definition at line 123 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ SetFixedProbeToReferenceTransformName()
void vtkPlusTemporalCalibrationAlgo::SetFixedProbeToReferenceTransformName |
( |
const std::string & |
probeToReferenceTransformName | ) |
|
Sets ProbeToReferenceTransform name (in the format of "CoordinateSystem1ToCoordinateSystem2") for the moving signal. Only used if the fixed signal type is TRACKER_FRAME.
Definition at line 139 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ SetIntermediateFilesOutputDirectory()
void vtkPlusTemporalCalibrationAlgo::SetIntermediateFilesOutputDirectory |
( |
const std::string & |
outputDirectory | ) |
|
◆ SetMaximumMovingLagSec()
void vtkPlusTemporalCalibrationAlgo::SetMaximumMovingLagSec |
( |
double |
maxLagSec | ) |
|
◆ SetMovingFrames()
void vtkPlusTemporalCalibrationAlgo::SetMovingFrames |
( |
vtkIGSIOTrackedFrameList * |
frameList, |
|
|
FRAME_TYPE |
frameType |
|
) |
| |
Sets the list of frames and the type of the data set (tracking data, video data, ...) that will be used to compute the "moving" position signal (that is interpolated during the signal alignment process at each position of the fixed signal values). The moving signalat the usually the tracking data, because it is more dense than the video data, so the interpolation at the less dense video timepoints is more accurate.
Definition at line 145 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ SetMovingProbeToReferenceTransformName()
void vtkPlusTemporalCalibrationAlgo::SetMovingProbeToReferenceTransformName |
( |
const std::string & |
probeToReferenceTransformName | ) |
|
Sets ProbeToReferenceTransform name (in the format of "CoordinateSystem1ToCoordinateSystem2") for the moving signal. Only used if the moving signal type is TRACKER_FRAME.
Definition at line 161 of file vtkPlusTemporalCalibrationAlgo.cxx.
◆ SetSamplingResolutionSec()
void vtkPlusTemporalCalibrationAlgo::SetSamplingResolutionSec |
( |
double |
samplingResolutionSec | ) |
|
◆ SetSaveIntermediateImages()
void vtkPlusTemporalCalibrationAlgo::SetSaveIntermediateImages |
( |
bool |
saveIntermediateImages | ) |
|
◆ SetVideoClipRectangle()
void vtkPlusTemporalCalibrationAlgo::SetVideoClipRectangle |
( |
int * |
clipRectOriginIntVec, |
|
|
int * |
clipRectSizeIntVec |
|
) |
| |
◆ Update()
◆ BestCorrelationLagIndex
double vtkPlusTemporalCalibrationAlgo::BestCorrelationLagIndex |
|
protected |
◆ BestCorrelationNormalizationFactor
double vtkPlusTemporalCalibrationAlgo::BestCorrelationNormalizationFactor |
|
protected |
◆ BestCorrelationTimeOffset
double vtkPlusTemporalCalibrationAlgo::BestCorrelationTimeOffset |
|
protected |
◆ BestCorrelationValue
double vtkPlusTemporalCalibrationAlgo::BestCorrelationValue |
|
protected |
◆ CalibrationError
double vtkPlusTemporalCalibrationAlgo::CalibrationError |
|
protected |
◆ CalibrationErrorVector
std::deque<double> vtkPlusTemporalCalibrationAlgo::CalibrationErrorVector |
|
protected |
◆ CorrelationTimeOffsets
std::deque<double> vtkPlusTemporalCalibrationAlgo::CorrelationTimeOffsets |
|
protected |
◆ CorrelationTimeOffsetsFine
std::deque<double> vtkPlusTemporalCalibrationAlgo::CorrelationTimeOffsetsFine |
|
protected |
◆ CorrelationValues
std::deque<double> vtkPlusTemporalCalibrationAlgo::CorrelationValues |
|
protected |
◆ CorrelationValuesFine
std::deque<double> vtkPlusTemporalCalibrationAlgo::CorrelationValuesFine |
|
protected |
The computed signal correlation values (corresponding to the better sign convention, in the second phase with fine resolution)
Definition at line 183 of file vtkPlusTemporalCalibrationAlgo.h.
◆ FixedSignal
SignalType vtkPlusTemporalCalibrationAlgo::FixedSignal |
|
protected |
◆ FixedSignalValuesNormalizationFactor
double vtkPlusTemporalCalibrationAlgo::FixedSignalValuesNormalizationFactor |
|
protected |
◆ IntermediateFilesOutputDirectory
std::string vtkPlusTemporalCalibrationAlgo::IntermediateFilesOutputDirectory |
|
protected |
◆ LineSegmentationClipRectangleOrigin
int vtkPlusTemporalCalibrationAlgo::LineSegmentationClipRectangleOrigin[2] |
|
protected |
◆ LineSegmentationClipRectangleSize
int vtkPlusTemporalCalibrationAlgo::LineSegmentationClipRectangleSize[2] |
|
protected |
◆ MaxCalibrationError
double vtkPlusTemporalCalibrationAlgo::MaxCalibrationError |
|
protected |
◆ MaxMovingLagSec
double vtkPlusTemporalCalibrationAlgo::MaxMovingLagSec |
|
protected |
◆ MovingLagSec
double vtkPlusTemporalCalibrationAlgo::MovingLagSec |
|
protected |
◆ MovingSignal
SignalType vtkPlusTemporalCalibrationAlgo::MovingSignal |
|
protected |
◆ NeverUpdated
bool vtkPlusTemporalCalibrationAlgo::NeverUpdated |
|
protected |
◆ SamplingResolutionSec
double vtkPlusTemporalCalibrationAlgo::SamplingResolutionSec |
|
protected |
◆ SaveIntermediateImages
bool vtkPlusTemporalCalibrationAlgo::SaveIntermediateImages |
|
protected |
◆ TrackerLagUpToDate
bool vtkPlusTemporalCalibrationAlgo::TrackerLagUpToDate |
|
protected |
The documentation for this class was generated from the following files: