#include <mitkVideoSource.h>
Public Types | |
typedef VideoSource | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
typedef mitk::Message< void > | StartedStoppedEvent |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual void | FetchFrame () |
virtual unsigned char * | GetVideoTexture () |
virtual void | StartCapturing () |
virtual void | StopCapturing () |
bool | IsCapturingEnabled () const |
int | GetImageWidth () |
int | GetImageHeight () |
void | EnableRotation (bool enable=true) |
void | SetRotationAngle (double rotationAngle) |
double | GetRotationAngle () |
virtual unsigned long | GetFrameCount () const |
Static Public Member Functions | |
static Pointer | New () |
Public Attributes | |
StartedStoppedEvent | Started |
StartedStoppedEvent | Stopped |
Protected Member Functions | |
VideoSource () | |
virtual | ~VideoSource () |
Protected Attributes | |
unsigned char * | m_CurrentVideoTexture |
int | m_CaptureWidth |
int | m_CaptureHeight |
bool | m_CapturingInProcess |
double | m_RotationAngle |
bool | m_RotationEnabled |
unsigned long | m_FrameCount |
Simple base class for acquiring video data.
Definition at line 32 of file mitkVideoSource.h.
typedef itk::SmartPointer<const Self> mitk::VideoSource::ConstPointer |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 35 of file mitkVideoSource.h.
typedef itk::SmartPointer<Self> mitk::VideoSource::Pointer |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 35 of file mitkVideoSource.h.
typedef VideoSource mitk::VideoSource::Self |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 35 of file mitkVideoSource.h.
typedef mitk::Message<void> mitk::VideoSource::StartedStoppedEvent |
Define two event types for getting informed when this videosource is started/stopped
Definition at line 36 of file mitkVideoSource.h.
typedef itk::Object mitk::VideoSource::Superclass |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 35 of file mitkVideoSource.h.
mitk::VideoSource::VideoSource | ( | ) | [protected] |
Definition at line 21 of file mitkVideoSource.cpp.
: m_CurrentVideoTexture(NULL), m_CaptureWidth(0), m_CaptureHeight(0), m_CapturingInProcess(false), m_RotationAngle(0.0), m_RotationEnabled(false), m_FrameCount(0) { }
mitk::VideoSource::~VideoSource | ( | ) | [protected, virtual] |
Definition at line 33 of file mitkVideoSource.cpp.
{ if(m_CurrentVideoTexture) delete m_CurrentVideoTexture; }
void mitk::VideoSource::EnableRotation | ( | bool | enable = true ) |
[inline] |
Definition at line 67 of file mitkVideoSource.h.
{m_RotationEnabled = enable;};
void mitk::VideoSource::FetchFrame | ( | ) | [virtual] |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 63 of file mitkVideoSource.cpp.
Referenced by QmitkVideoBackground::AddRenderWindow().
{ ++m_FrameCount; }
virtual const char* mitk::VideoSource::GetClassName | ( | ) | const [virtual] |
Reimplemented in mitk::OpenCVVideoSource.
virtual unsigned long mitk::VideoSource::GetFrameCount | ( | ) | const [virtual] |
int mitk::VideoSource::GetImageHeight | ( | ) | [inline] |
Definition at line 65 of file mitkVideoSource.h.
Referenced by QmitkVideoBackground::AddRenderWindow(), and QmitkVideoBackground::Modified().
{return m_CaptureHeight;}
int mitk::VideoSource::GetImageWidth | ( | ) | [inline] |
Definition at line 64 of file mitkVideoSource.h.
Referenced by QmitkVideoBackground::AddRenderWindow().
{return m_CaptureWidth;}
double mitk::VideoSource::GetRotationAngle | ( | ) | [inline] |
Definition at line 73 of file mitkVideoSource.h.
{return m_RotationAngle;};
unsigned char * mitk::VideoSource::GetVideoTexture | ( | ) | [virtual] |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 39 of file mitkVideoSource.cpp.
Referenced by QmitkVideoBackground::UpdateVideo().
{ // Fetch Frame and return pointer to opengl texture return 0; }
bool mitk::VideoSource::IsCapturingEnabled | ( | ) | const |
Definition at line 58 of file mitkVideoSource.cpp.
Referenced by QmitkOpenCVVideoControls::on_PlayButton_clicked(), and QmitkOpenCVVideoControls::~QmitkOpenCVVideoControls().
{ return m_CapturingInProcess; }
static Pointer mitk::VideoSource::New | ( | ) | [static] |
Reimplemented in mitk::OpenCVVideoSource.
void mitk::VideoSource::SetRotationAngle | ( | double | rotationAngle ) | [inline] |
Definition at line 70 of file mitkVideoSource.h.
{m_RotationAngle = rotationAngle;};
void mitk::VideoSource::StartCapturing | ( | ) | [virtual] |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 44 of file mitkVideoSource.cpp.
{ m_CapturingInProcess = true; m_FrameCount = 0; Started.Send(); }
void mitk::VideoSource::StopCapturing | ( | ) | [virtual] |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 51 of file mitkVideoSource.cpp.
References m_CapturingInProcess.
{ mitk::VideoSource::m_CapturingInProcess = false; m_FrameCount = 0; Stopped.Send(); }
int mitk::VideoSource::m_CaptureHeight [protected] |
Definition at line 83 of file mitkVideoSource.h.
int mitk::VideoSource::m_CaptureWidth [protected] |
Definition at line 83 of file mitkVideoSource.h.
bool mitk::VideoSource::m_CapturingInProcess [protected] |
Definition at line 84 of file mitkVideoSource.h.
Referenced by StopCapturing().
unsigned char* mitk::VideoSource::m_CurrentVideoTexture [protected] |
Reimplemented in mitk::OpenCVVideoSource.
Definition at line 82 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.
Definition at line 99 of file mitkVideoSource.h.
double mitk::VideoSource::m_RotationAngle [protected] |
Angle for rotating the video image
Definition at line 89 of file mitkVideoSource.h.
bool mitk::VideoSource::m_RotationEnabled [protected] |
Flag to enable or disable video rotation used for performance enhancement.
Definition at line 94 of file mitkVideoSource.h.
Definition at line 44 of file mitkVideoSource.h.
Definition at line 45 of file mitkVideoSource.h.