Medical Imaging Interaction Toolkit  2025.12.02
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 
57 
58  VideoRecorder(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 
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 
77  void RecordFrame() const;
79 
80  private:
81  class Impl;
82  std::unique_ptr<Impl> m_Impl;
83  };
84 }
85 
86 #endif
#define MITKCORE_EXPORT
Record the contents of a render window as video using FFmpeg as external command-line application.
void SetFFmpegPath(const fs::path &path)
void SetFrameRate(unsigned int fps)
int GetFrameRate() const
static std::string GetFileExtension(OutputFormat format)
Get the file extension corresponding to the specified video output format.
VideoRecorder & operator=(const VideoRecorder &)=delete
void RecordFrame() const
std::string GetRenderWindowName() const
VideoRecorder(const VideoRecorder &)=delete
fs::path GetOutputPath() const
OutputFormat GetOutputFormat() const
void SetRenderWindowName(const std::string &renderWindowName)
void SetOutputFormat(OutputFormat format)
fs::path GetFFmpegPath() const
void SetOutputPath(const fs::path &path)
Find image slices visible on a given plane.