Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::VideoSource Class Referenceabstract

#include <mitkVideoSource.h>

Inheritance diagram for mitk::VideoSource:
Collaboration diagram for mitk::VideoSource:

Public Member Functions

 mitkClassMacroItkParent (VideoSource, itk::Object)
 
virtual void FetchFrame ()
 
virtual unsigned char * GetVideoTexture ()=0
 
virtual void StartCapturing ()
 
virtual void StopCapturing ()
 
virtual bool IsCapturingEnabled () const
 
virtual int GetImageWidth ()
 
virtual int GetImageHeight ()
 
virtual unsigned long GetFrameCount () const
 
virtual bool GetCapturePaused () const
 
virtual void PauseCapturing ()
 

Protected Member Functions

 VideoSource ()
 
virtual ~VideoSource ()
 

Protected Attributes

unsigned char * m_CurrentVideoTexture
 
int m_CaptureWidth
 
int m_CaptureHeight
 
bool m_CapturingInProcess
 
unsigned long m_FrameCount
 
bool m_CapturePaused
 

Detailed Description

Simple base class for acquiring video data.

Definition at line 31 of file mitkVideoSource.h.

Constructor & Destructor Documentation

mitk::VideoSource::VideoSource ( )
protected

init member

Definition at line 19 of file mitkVideoSource.cpp.

mitk::VideoSource::~VideoSource ( )
protectedvirtual

deletes m_CurrentVideoTexture (if not 0)

Definition at line 29 of file mitkVideoSource.cpp.

Member Function Documentation

void mitk::VideoSource::FetchFrame ( )
virtual

assigns the grabbing devices for acquiring the next frame. in this base implementation it does nothing except incrementing m_FrameCount

Reimplemented in mitk::OpenCVVideoSource, and mitk::VideoInputSource.

Definition at line 54 of file mitkVideoSource.cpp.

Referenced by QmitkVideoBackground::AddRenderWindow().

bool mitk::VideoSource::GetCapturePaused ( ) const
virtual
unsigned long mitk::VideoSource::GetFrameCount ( ) const
virtual
Returns
the current frame count

Definition at line 70 of file mitkVideoSource.cpp.

int mitk::VideoSource::GetImageHeight ( )
virtual
Returns
the current frame height (might be 0 if unknown)

Definition at line 65 of file mitkVideoSource.cpp.

Referenced by QmitkVideoBackground::AddRenderWindow(), and QmitkVideoBackground::Modified().

int mitk::VideoSource::GetImageWidth ( )
virtual
Returns
the current frame width (might be 0 if unknown)

Definition at line 60 of file mitkVideoSource.cpp.

Referenced by QmitkVideoBackground::AddRenderWindow().

virtual unsigned char* mitk::VideoSource::GetVideoTexture ( )
pure virtual
Returns
a pointer to the image data array for opengl rendering.

Implemented in mitk::OpenCVVideoSource.

Referenced by QmitkVideoBackground::UpdateVideo().

bool mitk::VideoSource::IsCapturingEnabled ( ) const
virtual
Returns
true if video capturing is active.
See also
m_CapturingInProcess

Definition at line 49 of file mitkVideoSource.cpp.

Referenced by QmitkOpenCVVideoControls::Play(), and QmitkOpenCVVideoControls::~QmitkOpenCVVideoControls().

mitk::VideoSource::mitkClassMacroItkParent ( VideoSource  ,
itk::Object   
)

Smart pointer defs

void mitk::VideoSource::PauseCapturing ( )
virtual

toggles m_CapturePaused In Subclasses this function can be overwritten to take measurs to provide a pause image, BUT DO NOT FORGET TO TOGGLE m_CapturePaused

Reimplemented in mitk::OpenCVVideoSource.

Definition at line 80 of file mitkVideoSource.cpp.

void mitk::VideoSource::StartCapturing ( )
virtual

advices this class to start the video capturing. in this base implementation: toggles m_CapturingInProcess, resets m_FrameCount ATTENTION: this should be also done in subclasses overwriting this method

Reimplemented in mitk::OpenCVVideoSource, and mitk::VideoInputSource.

Definition at line 35 of file mitkVideoSource.cpp.

void mitk::VideoSource::StopCapturing ( )
virtual

advices this class to stop the video capturing. in this base implementation: toggles m_CapturingInProcess, resets m_FrameCount ATTENTION: this should be also done in subclasses overwriting this method

Reimplemented in mitk::OpenCVVideoSource, and mitk::VideoInputSource.

Definition at line 42 of file mitkVideoSource.cpp.

Member Data Documentation

int mitk::VideoSource::m_CaptureHeight
protected

should be filled when the first frame is available default: 0

Definition at line 116 of file mitkVideoSource.h.

Referenced by mitk::VideoInputSource::VideoInputSource().

bool mitk::VideoSource::m_CapturePaused
protected

Saves if the capturing is currently paused, i.e. this will not fetch any further frames but provide the current frame as long as m_CapturePaused is true default: false

Definition at line 137 of file mitkVideoSource.h.

int mitk::VideoSource::m_CaptureWidth
protected

should be filled when the first frame is available default: 0

Definition at line 110 of file mitkVideoSource.h.

Referenced by mitk::VideoInputSource::VideoInputSource().

bool mitk::VideoSource::m_CapturingInProcess
protected

saves if capturing is in procress default: false

Definition at line 122 of file mitkVideoSource.h.

Referenced by mitk::VideoInputSource::VideoInputSource().

unsigned char* mitk::VideoSource::m_CurrentVideoTexture
protected

finally this is what the video source must create: a video texture pointer default: 0

Definition at line 104 of file mitkVideoSource.h.

unsigned long mitk::VideoSource::m_FrameCount
protected

Saves the current frame count. Incremented in FetchFrame(). Resetted to 0 when StartCapturing() or StopCapturing() is called. default: 0

Definition at line 129 of file mitkVideoSource.h.


The documentation for this class was generated from the following files: