Medical Imaging Interaction Toolkit  2018.4.99-6aa36ba9
Medical Imaging Interaction Toolkit
mitkMovieGeneratorOpenCV.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef MovieGeneratorOpenCV_H_HEADER_INCLUDED
14 #define MovieGeneratorOpenCV_H_HEADER_INCLUDED
15 
16 #include "mitkMovieGenerator.h"
18 #include <memory.h>
19 #include <cstring>
20 
21 // OpenCV includes
22 #include "cv.h"
23 #include "highgui.h"
24 
25 
26 namespace mitk {
27 
28 
30 {
31 
32 public:
33 
35  itkFactorylessNewMacro(Self)
36  itkCloneMacro(Self)
37 
38  void SetFileName( const char *fileName ) override;
39 
40  void SetFourCCCodec(char* codec)
41  {
42  m_FourCCCodec = codec;
43  }
44 
45  void SetFrameRate(unsigned int rate) override;
46 
52  void SetRemoveColouredFrame(bool);
53 protected:
54 
56 
58  bool InitGenerator() override;
59 
61  bool AddFrame( void *data ) override;
62 
64  bool TerminateGenerator() override;
65 
67  std::string m_sFile;
68 
70  int m_dwRate;
71 
72 
73 private:
74 
75  CvVideoWriter* m_aviWriter;
76  IplImage * m_currentFrame;
77 
78  char * m_FourCCCodec;
79 
80  bool m_RemoveColouredFrame;
81 };
82 
83 } // namespace mitk
84 
85 #endif /* MovieGeneratorOpenCV_H_HEADER_INCLUDED */
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKOPENCVVIDEOSUPPORT_EXPORT
std::string m_sFile
name of output file
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40