Medical Imaging Interaction Toolkit  2024.06.99-5f7b36e7
Medical Imaging Interaction Toolkit
mitkMovieGenerator.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 mitkMovieGenerator_h
14 #define mitkMovieGenerator_h
15 
17 #include "mitkBaseRenderer.h"
18 #include "mitkCommon.h"
19 #include "mitkStepper.h"
20 
21 namespace mitk
22 {
23  class MITKALGORITHMSEXT_EXPORT MovieGenerator : public itk::LightObject
24  {
25  public:
26  mitkClassMacroItkParent(MovieGenerator, itk::LightObject);
27 
28  // delivers Win32 or Linux-versions of MovieGenerator
29  static Pointer New(void);
30 
32  virtual void SetStepper(Stepper *stepper) { m_stepper = stepper; }
34  virtual void SetRenderer(BaseRenderer *renderer) { m_renderer = renderer; }
36  virtual void SetFileName(const char *fileName) { strcpy(m_fileName, fileName); }
38  virtual bool WriteMovie();
39 
41  // it adds a single frame to a movie each time the function is called
42  // Initialization is done with first function call; Renderer and Filename have to be set up properly before.
43  virtual bool WriteCurrentFrameToMovie();
45  virtual void ReleaseMovieWriter();
46 
47  virtual void SetFrameRate(unsigned int rate);
48 
49  unsigned int GetFrameRate();
50 
51  protected:
54 
56  virtual bool InitGenerator() = 0;
57 
59  virtual bool AddFrame(void *data) = 0;
60 
62  virtual bool TerminateGenerator() = 0;
63 
65  char m_fileName[1024];
66 
69 
72 
74  int m_width, m_height;
75 
77 
78  unsigned int m_FrameRate;
79  };
80 
81 } // namespace mitk
82 
83 #endif
mitk::MovieGenerator::SetFileName
virtual void SetFileName(const char *fileName)
filename under which movie is saved
Definition: mitkMovieGenerator.h:36
mitk::MovieGenerator::m_renderer
BaseRenderer * m_renderer
stores the uses renderer
Definition: mitkMovieGenerator.h:71
mitk::MovieGenerator::m_width
int m_width
InitGenerator() stores movie size in those variables.
Definition: mitkMovieGenerator.h:74
mitk::MovieGenerator::m_FrameRate
unsigned int m_FrameRate
Definition: mitkMovieGenerator.h:78
MitkAlgorithmsExtExports.h
MITKALGORITHMSEXT_EXPORT
#define MITKALGORITHMSEXT_EXPORT
Definition: MitkAlgorithmsExtExports.h:15
mitk::MovieGenerator::m_initialized
bool m_initialized
Definition: mitkMovieGenerator.h:76
mitkClassMacroItkParent
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:45
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::MovieGenerator::SetStepper
virtual void SetStepper(Stepper *stepper)
stepper used to control movie generation
Definition: mitkMovieGenerator.h:32
mitk::Stepper
Helper class to step through a list.
Definition: mitkStepper.h:47
mitk::MovieGenerator::m_stepper
Stepper * m_stepper
stores the used stepper
Definition: mitkMovieGenerator.h:68
mitkCommon.h
mitkStepper.h
mitk::BaseRenderer
Definition: mitkBaseRenderer.h:56
mitk::MovieGenerator::SetRenderer
virtual void SetRenderer(BaseRenderer *renderer)
renderer to record
Definition: mitkMovieGenerator.h:34
mitk::MovieGenerator
Definition: mitkMovieGenerator.h:23
mitkBaseRenderer.h