VTK  9.0.3
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 { this->SetFrameSize(dim[0], dim[1], dim[2]); }
73 
77  void SetFrameRate(float rate) override;
78 
82  void SetOutputFormat(int format) override;
83 
85 
88  void SetPreview(int p);
89  vtkBooleanMacro(Preview, int);
90  vtkGetMacro(Preview, int);
92 
97 
102 
107  void Initialize() override;
108 
113  void ReleaseSystemResources() override;
114 
116 
119  void LocalInternalGrab(void*);
122 
123 protected:
126 
127  char WndClassName[16];
129  int Preview;
130 
131  vtkWin32VideoSourceInternal* Internal;
132 
133  void CheckBuffer();
134  void UnpackRasterLine(char* outptr, char* inptr, int start, int count) override;
135 
138 
139 private:
140  vtkWin32VideoSource(const vtkWin32VideoSource&) = delete;
141  void operator=(const vtkWin32VideoSource&) = delete;
142 };
143 
144 #endif
a simple class to control print indentation
Definition: vtkIndent.h:34
Superclass of video input devices for VTK.
Video-for-Windows video digitizer.
vtkWin32VideoSourceInternal * Internal
void ReleaseSystemResources() override
Free the driver (this is called automatically inside the destructor).
void SetFrameRate(float rate) override
Request a particular frame rate (default 30 frames per second).
~vtkWin32VideoSource() override
static vtkWin32VideoSource * New()
void SetFrameSize(int dim[3]) override
void VideoSourceDialog()
Bring up a modal dialog box for video input selection.
void Play() override
Standard VCR functionality: Play recorded video.
void Stop() override
Standard VCR functionality: Stop recording or playing.
void SetPreview(int p)
Turn on/off the preview (overlay) window.
void VideoFormatDialog()
Bring up a modal dialog box for video format selection.
void SetOutputFormat(int format) override
Request a particular output format (default: VTK_RGB).
void Initialize() override
Initialize the driver (this is called automatically when the first grab is done).
void UnpackRasterLine(char *outptr, char *inptr, int start, int count) override
void Grab() override
Grab a single video frame.
void SetFrameSize(int x, int y, int z) override
Request a particular frame size (set the third value to 1).
void LocalInternalGrab(void *)
For internal use only.
void Record() override
Standard VCR functionality: Record incoming video.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.