NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
mitkMakeMaskImagesFromStereoVideo.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef mitkMakeMaskImagesFromStereoVideo_h
16 #define mitkMakeMaskImagesFromStereoVideo_h
17 
18 #include "niftkOpenCVExports.h"
19 #include <string>
20 #include <itkObject.h>
21 #include <itkObjectFactory.h>
22 #include <mitkCommon.h>
23 #include <cv.h>
24 #include <highgui.h>
26 #include <set>
27 
28 namespace mitk {
29 
43 {
44 
45 public:
46 
47  mitkClassMacroItkParent(MakeMaskImagesFromStereoVideo, itk::Object)
49 
50 
55  void Initialise (std::string directory);
60  void Project(mitk::VideoTrackerMatching::Pointer matcher);
61 
67  void SetMatcherCameraToTracker(mitk::VideoTrackerMatching::Pointer matcher);
68 
69  itkSetStringMacro ( TimeStampsFile);
70  itkSetMacro ( TrackerIndex, int);
71  itkSetMacro ( ReferenceIndex, int);
72  itkSetMacro ( AllowableTimingError, long long);
73  itkSetMacro ( AskOverWrite, bool);
74  itkSetMacro ( HaltOnVideoReadFail, bool);
75  itkSetMacro ( Frequency, unsigned int);
76 
77  itkGetMacro ( InitOK, bool);
78  itkGetMacro ( ProjectOK, bool);
79  itkGetMacro ( WorldToLeftCameraMatrices, std::vector < cv::Mat > );
80 
81 protected:
82 
85 
86  MakeMaskImagesFromStereoVideo(const MakeMaskImagesFromStereoVideo&); // Purposefully not implemented.
87  MakeMaskImagesFromStereoVideo& operator=(const MakeMaskImagesFromStereoVideo&); // Purposefully not implemented.
88 
89 private:
90  std::string m_VideoIn; //the video in file
91  std::string m_Directory; //the directory containing the data
92  std::string m_TimeStampsFile;
93  std::set<unsigned long long> m_TimeStampsSet;
94  int m_TrackerIndex; //the tracker index to use for frame matching
95  int m_ReferenceIndex; //the reference index to use for frame matching, not used by default
96 
97  bool m_InitOK;
98  bool m_ProjectOK;
99  bool m_AskOverWrite; //if true, we will ask if you want to overwrite existing results
100  bool m_HaltOnVideoReadFail; //halt if video read fail
101 
102  unsigned int m_StartFrame; //you can exclude some frames at the start
103  unsigned int m_EndFrame; // and at the end
104  unsigned int m_Frequency; // the sample rate (process every m_Frequency frame)
105 
106  //the dimensions of the video screen in pixels
107  double m_VideoWidth;
108  double m_VideoHeight;
109 
110  std::vector < cv::Mat > m_WorldToLeftCameraMatrices; // the saved camera positions
111 
112  cv::VideoCapture* m_Capture;
113 
114  long long m_AllowableTimingError; // the maximum permisable timing error when setting points or calculating projection errors;
115 
116 }; // end class
117 
118 } // end namespace
119 
120 #endif
Definition: ReceptorMemberCommandTest.cxx:25
Takes an input video file and tracking data. The video is split into right and left channels...
Definition: mitkMakeMaskImagesFromStereoVideo.h:42
#define NIFTKOPENCV_EXPORT
Definition: niftkSequentialCpuQds.h:27
GLsizei const GLcharARB ** string
Definition: glew.h:5194