Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MovieGeneratorOpenCV_H_HEADER_INCLUDED
00019 #define MovieGeneratorOpenCV_H_HEADER_INCLUDED
00020
00021 #include "mitkMovieGenerator.h"
00022 #include <mitkOpenCVVideoSupportExports.h>
00023 #include <memory.h>
00024 #include <string.h>
00025
00026
00027 #include "cv.h"
00028 #include "highgui.h"
00029
00030
00031 namespace mitk {
00032
00033
00034 class MITK_OPENCVVIDEOSUPPORT_EXPORT MovieGeneratorOpenCV : public MovieGenerator
00035 {
00036
00037 public:
00038
00039 mitkClassMacro(MovieGeneratorOpenCV, MovieGenerator);
00040 itkNewMacro(Self);
00041
00042 virtual void SetFileName( const char *fileName );
00043
00044 void SetFourCCCodec(char* codec)
00045 {
00046 m_FourCCCodec = codec;
00047 }
00048
00049
00050 protected:
00051
00052 MovieGeneratorOpenCV();
00053
00055 virtual bool InitGenerator();
00056
00058 virtual bool AddFrame( void *data );
00059
00061 virtual bool TerminateGenerator();
00062
00064 const char * m_sFile;
00065
00067 int m_dwRate;
00068
00069
00070 private:
00071
00072 CvVideoWriter* m_aviWriter;
00073 IplImage * m_currentFrame;
00074
00075 char * m_FourCCCodec;
00076
00078 long m_lFrame;
00079 };
00080
00081 }
00082
00083 #endif