VTK
|
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: vtkWin32VideoSource.h 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00033 #ifndef __vtkWin32VideoSource_h 00034 #define __vtkWin32VideoSource_h 00035 00036 #include "vtkVideoSource.h" 00037 00038 class vtkWin32VideoSourceInternal; 00039 00040 class VTK_HYBRID_EXPORT vtkWin32VideoSource : public vtkVideoSource 00041 { 00042 public: 00043 static vtkWin32VideoSource *New(); 00044 vtkTypeMacro(vtkWin32VideoSource,vtkVideoSource); 00045 void PrintSelf(ostream& os, vtkIndent indent); 00046 00048 void Record(); 00049 00051 void Play(); 00052 00054 void Stop(); 00055 00057 void Grab(); 00058 00060 00061 void SetFrameSize(int x, int y, int z); 00062 virtual void SetFrameSize(int dim[3]) { 00063 this->SetFrameSize(dim[0], dim[1], dim[2]); }; 00065 00067 void SetFrameRate(float rate); 00068 00070 void SetOutputFormat(int format); 00071 00073 00074 void SetPreview(int p); 00075 vtkBooleanMacro(Preview,int); 00076 vtkGetMacro(Preview,int); 00078 00080 void VideoFormatDialog(); 00081 00083 void VideoSourceDialog(); 00084 00087 void Initialize(); 00088 00090 void ReleaseSystemResources(); 00091 00093 00094 void LocalInternalGrab(void*); 00095 void OnParentWndDestroy(); 00097 00098 protected: 00099 vtkWin32VideoSource(); 00100 ~vtkWin32VideoSource(); 00101 00102 char WndClassName[16]; 00103 int BitMapSize; 00104 int Preview; 00105 00106 vtkWin32VideoSourceInternal *Internal; 00107 00108 void CheckBuffer(); 00109 void UnpackRasterLine(char *outptr, char *inptr, 00110 int start, int count); 00111 00112 void DoVFWFormatSetup(); 00113 void DoVFWFormatCheck(); 00114 00115 private: 00116 vtkWin32VideoSource(const vtkWin32VideoSource&); // Not implemented. 00117 void operator=(const vtkWin32VideoSource&); // Not implemented. 00118 }; 00119 00120 #endif 00121 00122 00123 00124 00125