VTK
vtkWin32VideoSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWin32VideoSource.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
31 #ifndef vtkWin32VideoSource_h
32 #define vtkWin32VideoSource_h
33 
34 #include "vtkIOVideoModule.h" // For export macro
35 #include "vtkVideoSource.h"
36 
37 class vtkWin32VideoSourceInternal;
38 
39 class VTKIOVIDEO_EXPORT vtkWin32VideoSource : public vtkVideoSource
40 {
41 public:
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
49  void Record() override;
50 
54  void Play() override;
55 
59  void Stop() override;
60 
64  void Grab() override;
65 
67 
70  void SetFrameSize(int x, int y, int z) override;
71  void SetFrameSize(int dim[3]) override {
72  this->SetFrameSize(dim[0], dim[1], dim[2]); };
74 
78  void SetFrameRate(float rate) override;
79 
83  void SetOutputFormat(int format) override;
84 
86 
89  void SetPreview(int p);
90  vtkBooleanMacro(Preview,int);
91  vtkGetMacro(Preview,int);
93 
98 
103 
108  void Initialize() override;
109 
114  void ReleaseSystemResources() override;
115 
117 
120  void LocalInternalGrab(void*);
123 
124 protected:
127 
128  char WndClassName[16];
130  int Preview;
131 
132  vtkWin32VideoSourceInternal *Internal;
133 
134  void CheckBuffer();
135  void UnpackRasterLine(char *outptr, char *inptr,
136  int start, int count) override;
137 
140 
141 private:
142  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
143  void operator=(const vtkWin32VideoSource&) = delete;
144 };
145 
146 #endif
147 
148 
149 
150 
151 
vtkWin32VideoSource::~vtkWin32VideoSource
~vtkWin32VideoSource()
vtkWin32VideoSource::BitMapSize
int BitMapSize
Definition: vtkWin32VideoSource.h:129
vtkWin32VideoSource::vtkWin32VideoSource
vtkWin32VideoSource()
vtkWin32VideoSource::SetPreview
void SetPreview(int p)
Turn on/off the preview (overlay) window.
vtkWin32VideoSource::SetFrameSize
void SetFrameSize(int dim[3]) override
Definition: vtkWin32VideoSource.h:71
vtkVideoSource.h
vtkWin32VideoSource::Play
void Play() override
Standard VCR functionality: Play recorded video.
vtkWin32VideoSource::DoVFWFormatSetup
void DoVFWFormatSetup()
vtkWin32VideoSource::DoVFWFormatCheck
void DoVFWFormatCheck()
vtkWin32VideoSource::OnParentWndDestroy
void OnParentWndDestroy()
vtkWin32VideoSource::SetOutputFormat
void SetOutputFormat(int format) override
Request a particular output format (default: VTK_RGB).
vtkWin32VideoSource::ReleaseSystemResources
void ReleaseSystemResources() override
Free the driver (this is called automatically inside the destructor).
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkWin32VideoSource::New
static vtkWin32VideoSource * New()
vtkWin32VideoSource::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkWin32VideoSource::Stop
void Stop() override
Standard VCR functionality: Stop recording or playing.
vtkWin32VideoSource::Internal
vtkWin32VideoSourceInternal * Internal
Definition: vtkWin32VideoSource.h:132
vtkWin32VideoSource::Preview
int Preview
Definition: vtkWin32VideoSource.h:130
vtkWin32VideoSource::SetFrameRate
void SetFrameRate(float rate) override
Request a particular frame rate (default 30 frames per second).
vtkWin32VideoSource::UnpackRasterLine
void UnpackRasterLine(char *outptr, char *inptr, int start, int count) override
vtkWin32VideoSource::Grab
void Grab() override
Grab a single video frame.
vtkVideoSource::SetFrameSize
virtual void SetFrameSize(int x, int y, int z)
Set the full-frame size.
vtkWin32VideoSource
Video-for-Windows video digitizer.
Definition: vtkWin32VideoSource.h:40
vtkWin32VideoSource::SetFrameSize
void SetFrameSize(int x, int y, int z) override
Request a particular frame size (set the third value to 1).
vtkWin32VideoSource::VideoSourceDialog
void VideoSourceDialog()
Bring up a modal dialog box for video input selection.
vtkWin32VideoSource::CheckBuffer
void CheckBuffer()
vtkWin32VideoSource::Initialize
void Initialize() override
Initialize the driver (this is called automatically when the first grab is done).
vtkWin32VideoSource::LocalInternalGrab
void LocalInternalGrab(void *)
For internal use only.
vtkWin32VideoSource::VideoFormatDialog
void VideoFormatDialog()
Bring up a modal dialog box for video format selection.
vtkVideoSource
Superclass of video input devices for VTK.
Definition: vtkVideoSource.h:44
vtkWin32VideoSource::Record
void Record() override
Standard VCR functionality: Record incoming video.