Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkVideoSource.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 mitkVideoSource_h
14 #define mitkVideoSource_h
15 
17 #include <mitkCommon.h>
18 #include <itkObject.h>
19 #include <itkObjectFactory.h>
20 #include <mitkMessage.h>
21 
22 namespace mitk
23 {
33  class MITKDATATYPESEXT_EXPORT VideoSource : virtual public itk::Object
34  {
35  public:
37 
44  virtual void FetchFrame();
45 
53  virtual unsigned char *GetVideoTexture() = 0;
54 
61  virtual void StartCapturing();
62 
69  virtual void StopCapturing();
70 
75  virtual bool IsCapturingEnabled() const;
76 
81  virtual int GetImageWidth();
82 
87  virtual int GetImageHeight();
88 
93  virtual unsigned long GetFrameCount() const;
94 
99  virtual bool GetCapturePaused() const;
100 
107  virtual void PauseCapturing();
108 
109  protected:
117  ~VideoSource() override;
118 
119  protected:
124  unsigned char *m_CurrentVideoTexture;
125 
131 
137 
143 
149  unsigned long m_FrameCount;
150 
158  };
159 }
160 #endif
#define MITKDATATYPESEXT_EXPORT
Abstract base class for acquiring video frame data.
mitkClassMacroItkParent(VideoSource, itk::Object)
virtual bool GetCapturePaused() const
Query whether capturing is currently paused.
~VideoSource() override
virtual void FetchFrame()
Fetch the next frame from the capture device.
unsigned long m_FrameCount
virtual int GetImageHeight()
Get the height of the current video frame.
virtual void StopCapturing()
Stop video capturing.
virtual void StartCapturing()
Start video capturing.
virtual int GetImageWidth()
Get the width of the current video frame.
virtual bool IsCapturingEnabled() const
Query whether video capturing is currently active.
virtual unsigned long GetFrameCount() const
Get the number of frames captured since the last start.
virtual unsigned char * GetVideoTexture()=0
Get a pointer to the current video frame pixel data.
unsigned char * m_CurrentVideoTexture
virtual void PauseCapturing()
Toggle the capture pause state.
Find image slices visible on a given plane.