Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
#include <QmitkVideoBackground.h>
Classes | |
struct | VideoBackgroundVectorInfo |
Public Slots | |
void | UpdateVideo () |
Signals | |
void | NewFrameAvailable (mitk::VideoSource *) |
void | EndOfVideoSourceReached (mitk::VideoSource *) |
Public Member Functions | |
QmitkVideoBackground (QObject *parent=nullptr) | |
QmitkVideoBackground (mitk::VideoSource *v, int TimerDelay=25) | |
~QmitkVideoBackground () override | |
void | AddRenderWindow (vtkRenderWindow *renderWindow) |
add a RenderWindow in which the video is displayed. -> must be initialized before enabling the background. if the renderwindow was previously inserted it will get re-inserted (restarted videobackground) ATTENTION: to size the renderwindow correctly GetImageWidth() of the video source will be called and if no size is returned: FetchFrame() on the video source will be called to get the first frame and the corresponding size More... | |
void | RemoveRenderWindow (vtkRenderWindow *renderWindow) |
removes a renderwindow = disables video background there More... | |
bool | IsRenderWindowIncluded (vtkRenderWindow *renderWindow) |
void | SetTimerDelay (int ms) |
sets the update rate of the video in milli seconds, by default 25. More... | |
void | Enable () |
void | Disable () |
disables visualization of the video. More... | |
bool | IsEnabled () |
Checks, if the Video background is currently enabled (visible). More... | |
mitk::VideoSource * | GetVideoSource () |
int | GetTimerDelay () |
void | Pause () |
void | Resume () |
void | SetVideoSource (mitk::VideoSource *videoSource) |
void | OnVideoSourceDelete (const itk::Object *caller, const itk::EventObject &event) |
Static Public Member Functions | |
static void | OnRenderWindowDelete (vtkObject *, unsigned long eid, void *clientdata, void *) |
Protected Types | |
typedef std::vector< VideoBackgroundVectorInfo > | RenderWindowVectorInfoType |
Protected Member Functions | |
void | RemoveRenderWindow (vtkRenderWindow *renderWindow, bool removeObserver) |
void | ResetVideoBackground () |
void | Modified () |
Protected Attributes | |
RenderWindowVectorInfoType | m_renderWindowVectorInfo |
QTimer * | m_QTimer |
mitk::VideoSource * | m_VideoSource |
unsigned long | m_VideoSourceObserverTag |
Displays a 3-channel (!) video data in the background of one or more vtkRenderWindow(s). The video is provided by a mitkVideoSource / GetVideoTexture(). Caution: As the texture data is not being copied, the user is responsible for a valid pointer to the data. Also the image dimensions needs to be set correctly before enabling the background.
Definition at line 41 of file QmitkVideoBackground.h.
|
protected |
the class has to store a list of renderwindows
Definition at line 179 of file QmitkVideoBackground.h.
|
explicit |
default ctor, TimerDelay is 40 by default you must SetVideoSource() and AddRenderWindow() afterwards
|
explicit |
constructs a video background with the given video source no parent is set here, dont forget to delete the object or call setParent() TimerDelay = refresh rate of video in ms (25 ms = 40 Hz). you must call AddRenderWindow() afterwards
|
override |
disables all video backgrounds
void QmitkVideoBackground::AddRenderWindow | ( | vtkRenderWindow * | renderWindow | ) |
add a RenderWindow in which the video is displayed. -> must be initialized before enabling the background. if the renderwindow was previously inserted it will get re-inserted (restarted videobackground) ATTENTION: to size the renderwindow correctly GetImageWidth() of the video source will be called and if no size is returned: FetchFrame() on the video source will be called to get the first frame and the corresponding size
void QmitkVideoBackground::Disable | ( | ) |
disables visualization of the video.
void QmitkVideoBackground::Enable | ( | ) |
visualizes the video. Requires image dimensions and an active videosource to be set.
|
signal |
int QmitkVideoBackground::GetTimerDelay | ( | ) |
Returns the timer delay
mitk::VideoSource* QmitkVideoBackground::GetVideoSource | ( | ) |
Returns the videosource attached to this background
bool QmitkVideoBackground::IsEnabled | ( | ) |
Checks, if the Video background is currently enabled (visible).
bool QmitkVideoBackground::IsRenderWindowIncluded | ( | vtkRenderWindow * | renderWindow | ) |
|
protected |
inits all renderwindows with default values, called before video rendering is started
|
signal |
emitted after all video backgrounds are filled with the new video frame
|
static |
receive renderwindow delete events
void QmitkVideoBackground::OnVideoSourceDelete | ( | const itk::Object * | caller, |
const itk::EventObject & | event | ||
) |
receive VideoSource delete event
void QmitkVideoBackground::Pause | ( | ) |
pauses the playback (stops the update timer)
void QmitkVideoBackground::RemoveRenderWindow | ( | vtkRenderWindow * | renderWindow | ) |
removes a renderwindow = disables video background there
|
protected |
removes the renderwindow and also removes the observer if the flag is set
|
protected |
reset all video backgrounds
void QmitkVideoBackground::Resume | ( | ) |
resumes the playback (restarts the update timer)
void QmitkVideoBackground::SetTimerDelay | ( | int | ms | ) |
sets the update rate of the video in milli seconds, by default 25.
void QmitkVideoBackground::SetVideoSource | ( | mitk::VideoSource * | videoSource | ) |
sets a new video source (if previously enabled, this will stop the video background if it was previously enabled
|
slot |
update all video backgrounds. (called by the timer or manually by the user)
|
protected |
calls updatevideo repeateadly for framegrabbing
Definition at line 190 of file QmitkVideoBackground.h.
|
protected |
a list of renderwindows and associated renderers and actors and imageimporters
Definition at line 185 of file QmitkVideoBackground.h.
|
protected |
must implement GetVideoTexture() correctly (must return an OpenGL texture)
Definition at line 195 of file QmitkVideoBackground.h.
|
protected |
the observer tag for the video source
Definition at line 200 of file QmitkVideoBackground.h.