NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
mitkBaseVideoProcessor.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 mitkBaseVideoProcessor_h
16 #define mitkBaseVideoProcessor_h
17 
18 #include "niftkOpenCVExports.h"
19 
20 #include <cv.h>
21 #include <highgui.h>
22 #include <cstdlib>
23 #include <iostream>
24 #include <itkObject.h>
25 #include <itkObjectFactory.h>
26 #include <mitkCommon.h>
27 
34 namespace mitk {
35 
36 class NIFTKOPENCV_EXPORT BaseVideoProcessor : public itk::Object
37 {
38 
39 public:
40 
41  mitkClassMacroItkParent(BaseVideoProcessor, itk::Object)
42 
43 
47  virtual void Initialize();
48 
52  virtual void Run() = 0;
53 
54 protected:
55 
57  BaseVideoProcessor(CvCapture *capture = NULL, CvVideoWriter *writer = NULL);
58  BaseVideoProcessor(const std::string& inputFile, const std::string& outputFile);
59 
60  BaseVideoProcessor(const BaseVideoProcessor&); // Purposefully not implemented.
61  BaseVideoProcessor& operator=(const BaseVideoProcessor&); // Purposefully not implemented.
62 
67  virtual CvSize GetOutputImageSize() = 0;
68 
72  IplImage* GetCurrentImage() const;
73 
78  IplImage* GrabNewImage();
79 
83  CvVideoWriter* GetWriter() const;
84 
85 private:
86 
87  IplImage *m_GrabbedImage;
88  CvCapture *m_Capture;
89  CvVideoWriter *m_Writer;
90  std::string m_InputFileName;
91  std::string m_OutputFileName;
92 }; // end class
93 
94 } // end namespace
95 
96 #endif // MITKBASEVIDEOPROCESSOR_H
Definition: ReceptorMemberCommandTest.cxx:25
Definition: mitkBaseVideoProcessor.h:36
#define NIFTKOPENCV_EXPORT
Definition: niftkSequentialCpuQds.h:27
GLsizei const GLcharARB ** string
Definition: glew.h:5194