Medical Imaging Interaction Toolkit  2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
mitkVideoRecorder.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 mitkVideoRecorder_h
14 #define mitkVideoRecorder_h
15 
16 #include <mitkFileSystem.h>
17 #include <memory>
18 #include <string>
19 
20 #include <MitkCoreExports.h>
21 
22 namespace mitk
23 {
41  {
42  public:
43  enum class OutputFormat
44  {
45  WebM_VP9,
46  MP4_H264
47  };
48 
53  static std::string GetFileExtension(OutputFormat format);
54 
55  VideoRecorder();
56  ~VideoRecorder();
57 
58  VideoRecorder(const VideoRecorder&) = delete;
59  VideoRecorder& operator=(const VideoRecorder&) = delete;
60 
61  fs::path GetFFmpegPath() const;
62  void SetFFmpegPath(const fs::path& path);
63 
64  fs::path GetOutputPath() const;
65  void SetOutputPath(const fs::path& path);
66 
67  OutputFormat GetOutputFormat() const;
68  void SetOutputFormat(OutputFormat format);
69 
70  std::string GetRenderWindowName() const;
71  void SetRenderWindowName(const std::string& renderWindowName);
72 
73  int GetFrameRate() const;
74  void SetFrameRate(unsigned int fps);
75 
76  void StartRecording();
77  void RecordFrame() const;
78  int StopRecording();
79 
80  private:
81  class Impl;
82  std::unique_ptr<Impl> m_Impl;
83  };
84 }
85 
86 #endif
mitk::VideoRecorder::OutputFormat
OutputFormat
Definition: mitkVideoRecorder.h:43
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
MitkCoreExports.h
mitk::VideoRecorder
Record the contents of a render window as video using FFmpeg as external command-line application.
Definition: mitkVideoRecorder.h:40
mitkFileSystem.h
MITKCORE_EXPORT
#define MITKCORE_EXPORT
Definition: MitkCoreExports.h:15