Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitkVideoSource.cpp
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #include "mitkVideoSource.h"
18 
20  : m_CurrentVideoTexture(nullptr),
21  m_CaptureWidth(0),
22  m_CaptureHeight(0),
23  m_CapturingInProcess(false),
24  m_FrameCount(0),
25  m_CapturePaused(false)
26 {
27 }
28 
30 {
31  if (m_CurrentVideoTexture)
32  delete m_CurrentVideoTexture;
33 }
34 
36 {
37  m_CapturingInProcess = true;
38  m_FrameCount = 0;
39  this->Modified();
40 }
41 
43 {
44  m_CapturingInProcess = false;
45  m_FrameCount = 0;
46  this->Modified();
47 }
48 
50 {
51  return m_CapturingInProcess;
52 }
53 
55 {
56  ++m_FrameCount;
57  this->Modified();
58 }
59 
61 {
62  return m_CaptureWidth;
63 }
64 
66 {
67  return m_CaptureHeight;
68 }
69 
70 unsigned long mitk::VideoSource::GetFrameCount() const
71 {
72  return m_FrameCount;
73 }
74 
76 {
77  return m_CapturePaused;
78 }
79 
81 {
82  m_CapturePaused = !m_CapturePaused;
83 }
virtual unsigned long GetFrameCount() const
virtual bool IsCapturingEnabled() const
virtual int GetImageHeight()
virtual void StartCapturing()
virtual void StopCapturing()
virtual int GetImageWidth()
virtual void PauseCapturing()
virtual void FetchFrame()
virtual bool GetCapturePaused() const