13 #ifndef QmitkVideoBackground_h
14 #define QmitkVideoBackground_h
26 class vtkRenderWindow;
30 class vtkVideoSizeCallback;
Displays 3-channel video data as the background layer of vtkRenderWindows.
void SetVideoSource(mitk::VideoSource *videoSource)
Set a new video source.
bool IsEnabled()
Check whether the video background is currently enabled.
QmitkVideoBackground(mitk::VideoSource *v, int TimerDelay=25)
Construct a video background with the given video source.
void OnVideoSourceDelete(const itk::Object *caller, const itk::EventObject &event)
ITK observer callback for video source deletion events.
unsigned long m_VideoSourceObserverTag
std::vector< VideoBackgroundVectorInfo > RenderWindowVectorInfoType
bool IsRenderWindowIncluded(vtkRenderWindow *renderWindow)
Check whether a render window is currently registered.
static void OnRenderWindowDelete(vtkObject *object, unsigned long eid, void *clientdata, void *)
Static VTK callback for render window deletion events.
RenderWindowVectorInfoType m_renderWindowVectorInfo
void Disable()
Disable video background visualization and stop the update timer.
~QmitkVideoBackground() override
Destructor. Disables all video backgrounds.
mitk::VideoSource * GetVideoSource()
Get the attached video source.
void Enable()
Enable video background visualization and start the update timer.
int GetTimerDelay()
Get the current timer delay.
void UpdateVideo()
Fetch a new video frame and update all registered render windows.
mitk::VideoSource * m_VideoSource
void Pause()
Pause the video playback by stopping the update timer.
void ResetVideoBackground()
void RemoveRenderWindow(vtkRenderWindow *renderWindow, bool removeObserver)
QmitkVideoBackground(QObject *parent=nullptr)
Construct a video background with no video source.
void NewFrameAvailable(mitk::VideoSource *videoSource)
Emitted after all render windows have been updated with a new frame.
void Resume()
Resume the video playback by restarting the update timer.
void EndOfVideoSourceReached(mitk::VideoSource *videoSource)
Emitted when the video source reaches the end of its stream.
void AddRenderWindow(vtkRenderWindow *renderWindow)
Add a render window in which the video is displayed.
void RemoveRenderWindow(vtkRenderWindow *renderWindow)
Remove a render window and disable video background in it.
void SetTimerDelay(int ms)
Set the video refresh interval.
Abstract base class for acquiring video frame data.
vtkImageActor * videoActor
unsigned long renderWindowObserverTag
vtkImageImport * videoImport
vtkRenderer * videoRenderer