00001 /*========================================================================= 00002 00003 Program: Medical Imaging & Interaction Toolkit 00004 Language: C++ 00005 Date: $Date$ 00006 Version: $Revision$ 00007 00008 Copyright (c) German Cancer Research Center, Division of Medical and 00009 Biological Informatics. All rights reserved. 00010 See MITKCopyright.txt or https://www.mitk.org/copyright.html for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 00018 00019 #include "mitkVideoSource.h" 00020 00021 mitk::VideoSource::VideoSource() 00022 : 00023 m_CurrentVideoTexture(NULL), 00024 m_CaptureWidth(0), 00025 m_CaptureHeight(0), 00026 m_CapturingInProcess(false), 00027 m_RotationAngle(0.0), 00028 m_RotationEnabled(false), 00029 m_FrameCount(0) 00030 { 00031 } 00032 00033 mitk::VideoSource::~VideoSource() 00034 { 00035 if(m_CurrentVideoTexture) 00036 delete m_CurrentVideoTexture; 00037 } 00038 00039 unsigned char* mitk::VideoSource::GetVideoTexture() 00040 { // Fetch Frame and return pointer to opengl texture 00041 return 0; 00042 } 00043 00044 void mitk::VideoSource::StartCapturing() 00045 { 00046 m_CapturingInProcess = true; 00047 m_FrameCount = 0; 00048 Started.Send(); 00049 } 00050 00051 void mitk::VideoSource::StopCapturing() 00052 { 00053 mitk::VideoSource::m_CapturingInProcess = false; 00054 m_FrameCount = 0; 00055 Stopped.Send(); 00056 } 00057 00058 bool mitk::VideoSource::IsCapturingEnabled() const 00059 { 00060 return m_CapturingInProcess; 00061 } 00062 00063 void mitk::VideoSource::FetchFrame() 00064 { 00065 ++m_FrameCount; 00066 }