NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Member Functions | Protected Member Functions | List of all members
mitk::TrackerAnalysis Class Reference

A class to match video frames to tracking frames, when reading recorded tracking data. More...

Inheritance diagram for mitk::TrackerAnalysis:
Inheritance graph
[legend]
Collaboration diagram for mitk::TrackerAnalysis:
Collaboration graph
[legend]

Public Member Functions

 mitkClassMacroItkParent (TrackerAnalysis, itk::Object) static Pointer New()
 
void TemporalCalibration (std::string filename, int windowLow=-100, int windowHigh=100, bool visualise=false, std::string fileout="")
 Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The VideoLag is adjusted so as to minimalise the standard deviation of the reconstructed world point. More...
 
void OptimiseHandeyeCalibration (std::string filename, bool visualise=false, std::string fileout="")
 Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The world position of the point and the handeye calibration are optimised to minimise the residual error of the reconstructed point. More...
 
void HandeyeSensitivityTest (std::string filename, double windowLow, double windowHigh, double stepSize, std::string fileout="")
 Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The world position of the point is is determined using a range of perturbed values for the handeye matrix. The variance in the residual reconstruction error is used to determine the sensitivity of the system to errors in the hand eye calibration. More...
 
virtual void SetCalibrationDirectory (std::string _arg)
 
- Public Member Functions inherited from mitk::VideoTrackerMatching
 mitkClassMacroItkParent (VideoTrackerMatching, itk::Object) static Pointer New()
 
void Initialise (std::string directory)
 Initialise the class by passing it a directory name. More...
 
cv::Mat GetTrackerMatrix (unsigned int FrameNumber, long long *TimingError=NULL, unsigned int TrackerIndex=0, int ReferenceIndex=-1)
 Return the tracking matrix for a given video frame number. More...
 
cv::Mat GetCameraTrackingMatrix (unsigned int FrameNumber, long long *TimingError=NULL, unsigned int TrackerIndex=0, std::vector< double > *Perturbation=NULL, int ReferenceIndex=-1)
 Return the tracking matrix multiplied by the camera to tracker matrix for a given video frame number. More...
 
cv::Mat GetVideoFrame (unsigned int FrameNumber, unsigned long long *TimingStamp=NULL)
 Returns a frame of video data (WARNING, not implemented, if you use this you will only get a 4x4 junk matrix back) and the time stamp for a given frame number. More...
 
unsigned long long GetVideoFrameTimeStamp (unsigned int FrameNumber)
 Returns the time stamp for a frame of video data. More...
 
bool IsReady ()
 returns state of m_Ready More...
 
virtual void SetFlipMatrices (bool _arg)
 Set a flag as to whether to flip matrices between left/right handed, default is right. More...
 
virtual void SetWriteTimingErrors (bool _arg)
 Set a flag as to whether to write out the timing errors. More...
 
virtual void SetHaltOnFrameSkip (bool _arg)
 Set a flag to determine what to do if a skipped frame is found, by default we halt. More...
 
virtual void SetInterpolateMatrices (bool _arg)
 Set a flag to determine whether we interpolate matrices or just use nearest neighbour. More...
 
virtual std::string GetFrameMap ()
 Set a flag to determine what to do if a skipped frame is found, by default we halt. More...
 
int GetNumberOfFrames ()
 Get the frame count. More...
 
void SetVideoLagMilliseconds (unsigned long long VideoLag, bool VideoLeadsTracking=false, int trackerIndex=-1)
 If the tracking data is ahead of the video data you can set a video lag in milliseconds to account for this. If the video is ahead of the tracking set argument 2 to true. More...
 
void SetCameraToTracker (cv::Mat, int trackerIndex=-1)
 set the camera to tracker matrix. if tracker index = -1 all camera to tracker matrices will be set with the same value More...
 
void SetCameraToTrackers (std::string filename)
 
unsigned int GetTrackingMatricesSize ()
 

Protected Member Functions

 TrackerAnalysis ()
 
virtual ~TrackerAnalysis ()
 
 TrackerAnalysis (const TrackerAnalysis &)
 
TrackerAnalysisoperator= (const TrackerAnalysis &)
 
- Protected Member Functions inherited from mitk::VideoTrackerMatching
 VideoTrackerMatching ()
 
virtual ~VideoTrackerMatching ()
 
 VideoTrackerMatching (const VideoTrackerMatching &)
 
VideoTrackerMatchingoperator= (const VideoTrackerMatching &)
 
std::vector
< mitk::WorldPointsWithTimingError
ReadPointsInLensCSFile (std::string filename, int PointsPerFrame=1, std::vector< mitk::ProjectedPointPairsWithTimingError > *onScreenPoints=NULL)
 Reads a file that defines the position of a point fixed in world coordinates relative to the camera lens. [framenumber][pointID] [framenumber][pointID](left,right) More...
 

Additional Inherited Members

- Protected Attributes inherited from mitk::VideoTrackerMatching
std::vector< unsigned intm_FrameNumbers
 
TimeStampsContainer m_VideoTimeStamps
 
bool m_Ready
 
bool m_FlipMatrices
 
bool m_WriteTimingErrors
 
bool m_InterpolateMatrices
 
std::string m_Directory
 

Detailed Description

A class to match video frames to tracking frames, when reading recorded tracking data.

Constructor & Destructor Documentation

mitk::TrackerAnalysis::TrackerAnalysis ( )
protected
mitk::TrackerAnalysis::~TrackerAnalysis ( )
protectedvirtual
mitk::TrackerAnalysis::TrackerAnalysis ( const TrackerAnalysis )
protected

Member Function Documentation

void mitk::TrackerAnalysis::HandeyeSensitivityTest ( std::string  filename,
double  windowLow,
double  windowHigh,
double  stepSize,
std::string  fileout = "" 
)

Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The world position of the point is is determined using a range of perturbed values for the handeye matrix. The variance in the residual reconstruction error is used to determine the sensitivity of the system to errors in the hand eye calibration.

mitk::TrackerAnalysis::mitkClassMacroItkParent ( TrackerAnalysis  ,
itk::Object   
)
TrackerAnalysis& mitk::TrackerAnalysis::operator= ( const TrackerAnalysis )
protected
void mitk::TrackerAnalysis::OptimiseHandeyeCalibration ( std::string  filename,
bool  visualise = false,
std::string  fileout = "" 
)

Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The world position of the point and the handeye calibration are optimised to minimise the residual error of the reconstructed point.

virtual void mitk::TrackerAnalysis::SetCalibrationDirectory ( std::string  _arg)
virtual
void mitk::TrackerAnalysis::TemporalCalibration ( std::string  filename,
int  windowLow = -100,
int  windowHigh = 100,
bool  visualise = false,
std::string  fileout = "" 
)

Pass a file name that defines the position of a point fixed in world coordinates relative to the camera lens, along with the on screen coordinates of the point. The VideoLag is adjusted so as to minimalise the standard deviation of the reconstructed world point.


The documentation for this class was generated from the following files: