NifTK
16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
|
A class to match video frames to tracking frames, when reading recorded tracking data. More...
Public Member Functions | |
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 | |
VideoTrackerMatching () | |
virtual | ~VideoTrackerMatching () |
VideoTrackerMatching (const VideoTrackerMatching &) | |
VideoTrackerMatching & | operator= (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... | |
Protected Attributes | |
std::vector< unsigned int > | m_FrameNumbers |
TimeStampsContainer | m_VideoTimeStamps |
bool | m_Ready |
bool | m_FlipMatrices |
bool | m_WriteTimingErrors |
bool | m_InterpolateMatrices |
std::string | m_Directory |
A class to match video frames to tracking frames, when reading recorded tracking data.
|
protected |
|
protectedvirtual |
|
protected |
cv::Mat mitk::VideoTrackerMatching::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.
|
virtual |
Set a flag to determine what to do if a skipped frame is found, by default we halt.
|
inline |
Get the frame count.
cv::Mat mitk::VideoTrackerMatching::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.
unsigned int mitk::VideoTrackerMatching::GetTrackingMatricesSize | ( | ) |
cv::Mat mitk::VideoTrackerMatching::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.
unsigned long long mitk::VideoTrackerMatching::GetVideoFrameTimeStamp | ( | unsigned int | FrameNumber | ) |
Returns the time stamp for a frame of video data.
void mitk::VideoTrackerMatching::Initialise | ( | std::string | directory | ) |
Initialise the class by passing it a directory name.
|
inline |
returns state of m_Ready
mitk::VideoTrackerMatching::mitkClassMacroItkParent | ( | VideoTrackerMatching | , |
itk::Object | |||
) |
|
protected |
|
protected |
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)
set the camera to tracker matrix. if tracker index = -1 all camera to tracker matrices will be set with the same value
void mitk::VideoTrackerMatching::SetCameraToTrackers | ( | std::string | filename | ) |
|
virtual |
Set a flag as to whether to flip matrices between left/right handed, default is right.
|
virtual |
Set a flag to determine what to do if a skipped frame is found, by default we halt.
|
virtual |
Set a flag to determine whether we interpolate matrices or just use nearest neighbour.
void mitk::VideoTrackerMatching::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.
|
virtual |
Set a flag as to whether to write out the timing errors.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |