Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef MOVIEGENERATOR_H_HEADER_INCLUDED
18 
19 #define MOVIEGENERATOR_H_HEADER_INCLUDED
20 
22 #include "mitkBaseRenderer.h"
23 #include "mitkCommon.h"
24 #include "mitkStepper.h"
25 
26 namespace mitk
27 {
28  class MITKALGORITHMSEXT_EXPORT MovieGenerator : public itk::LightObject
29  {
30  public:
31  mitkClassMacroItkParent(MovieGenerator, itk::LightObject);
32 
33  // delivers Win32 or Linux-versions of MovieGenerator
34  static Pointer New(void);
35 
37  virtual void SetStepper(Stepper *stepper) { m_stepper = stepper; }
39  virtual void SetRenderer(BaseRenderer *renderer) { m_renderer = renderer; }
41  virtual void SetFileName(const char *fileName) { strcpy(m_fileName, fileName); }
43  virtual bool WriteMovie();
44 
46  // it adds a single frame to a movie each time the function is called
47  // Initialization is done with first function call; Renderer and Filename have to be set up properly before.
48  virtual bool WriteCurrentFrameToMovie();
50  virtual void ReleaseMovieWriter();
51 
52  virtual void SetFrameRate(unsigned int rate);
53 
54  unsigned int GetFrameRate();
55 
56  protected:
59 
61  virtual bool InitGenerator() = 0;
62 
64  virtual bool AddFrame(void *data) = 0;
65 
67  virtual bool TerminateGenerator() = 0;
68 
70  char m_fileName[1024];
71 
74 
77 
79  int m_width, m_height;
80 
82 
83  unsigned int m_FrameRate;
84  };
85 
86 } // namespace mitk
87 
88 #endif /* MOVIEGENERATOR_H_HEADER_INCLUDED */
virtual void SetFileName(const char *fileName)
filename under which movie is saved
Organizes the rendering process.
DataCollection - Class to facilitate loading/accessing structured data.
#define MITKALGORITHMSEXT_EXPORT
virtual void SetStepper(Stepper *stepper)
stepper used to control movie generation
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:53
Helper class to step through a list.
Definition: mitkStepper.h:51
Stepper * m_stepper
stores the used stepper
virtual void SetRenderer(BaseRenderer *renderer)
renderer to record
int m_width
InitGenerator() stores movie size in those variables.
BaseRenderer * m_renderer
stores the uses renderer
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.