VTK
vtkMILVideoSource.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMILVideoSource.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 =========================================================================*/
32 #ifndef vtkMILVideoSource_h
33 #define vtkMILVideoSource_h
34 
35 #include "vtkIOVideoModule.h" // For export macro
36 #include "vtkVideoSource.h"
37 
38 // digitizer hardware
39 #define VTK_MIL_DEFAULT 0
40 #define VTK_MIL_METEOR "M_SYSTEM_METEOR"
41 #define VTK_MIL_METEOR_II "M_SYSTEM_METEOR_II"
42 #define VTK_MIL_METEOR_II_DIG "M_SYSTEM_METEOR_II_DIG"
43 #define VTK_MIL_METEOR_II_CL "M_SYSTEM_METEOR_II_CL"
44 #define VTK_MIL_METEOR_II_1394 "M_SYSTEM_METEOR_II_1394"
45 #define VTK_MIL_CORONA "M_SYSTEM_CORONA"
46 #define VTK_MIL_CORONA_II "M_SYSTEM_CORONA_II"
47 #define VTK_MIL_PULSAR "M_SYSTEM_PULSAR"
48 #define VTK_MIL_GENESIS "M_SYSTEM_GENESIS"
49 #define VTK_MIL_GENESIS_PLUS "M_SYSTEM_GENESIS_PLUS"
50 #define VTK_MIL_ORION "M_SYSTEM_ORION"
51 #define VTK_MIL_CRONOS "M_SYSTEM_CRONOS"
52 #define VTK_MIL_ODYSSEY "M_SYSTEM_ODYSSEY"
53 
54 // video inputs:
55 #define VTK_MIL_MONO 0
56 #define VTK_MIL_COMPOSITE 1
57 #define VTK_MIL_YC 2
58 #define VTK_MIL_RGB 3
59 #define VTK_MIL_DIGITAL 4
60 
61 // video formats:
62 #define VTK_MIL_RS170 0
63 #define VTK_MIL_NTSC 1
64 #define VTK_MIL_CCIR 2
65 #define VTK_MIL_PAL 3
66 #define VTK_MIL_SECAM 4
67 #define VTK_MIL_NONSTANDARD 5
68 
69 class VTKIOVIDEO_EXPORT vtkMILVideoSource : public vtkVideoSource
70 {
71 public:
74  void PrintSelf(ostream& os, vtkIndent indent);
75 
79  void Record();
80 
84  void Play();
85 
89  void Stop();
90 
94  void Grab();
95 
99  void SetFrameSize(int x, int y, int z);
100 
104  void SetOutputFormat(int format);
105 
107 
110  virtual void SetVideoChannel(int channel);
111  vtkGetMacro(VideoChannel, int);
113 
115 
118  virtual void SetVideoFormat(int format);
119  void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); };
120  void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); };
121  void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); };
122  void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); };
123  void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); };
125  this->SetVideoFormat(VTK_MIL_NONSTANDARD); };
126  vtkGetMacro(VideoFormat,int);
128 
130 
133  virtual void SetVideoInput(int input);
134  void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); };
135  void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);};
136  void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); };
137  void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); };
138  void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); };
139  vtkGetMacro(VideoInput,int);
141 
143 
150  virtual void SetContrastLevel(float contrast);
151  vtkGetMacro(ContrastLevel,float);
152  virtual void SetBrightnessLevel(float brightness);
153  vtkGetMacro(BrightnessLevel,float);
154  virtual void SetHueLevel(float hue);
155  vtkGetMacro(HueLevel,float);
156  virtual void SetSaturationLevel(float saturation);
157  vtkGetMacro(SaturationLevel,float);
159 
161 
165  virtual void SetBlackLevel(float value);
166  virtual float GetBlackLevel() {
167  return this->BlackLevel; };
168  virtual void SetWhiteLevel(float value);
169  virtual float GetWhiteLevel() {
170  return this->WhiteLevel; };
172 
174 
178  vtkSetStringMacro(MILSystemType);
179  vtkGetStringMacro(MILSystemType);
180  void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); };
181  void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); };
182  void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); };
183  void SetMILSystemTypeToMeteorIICL() { this->SetMILSystemType(VTK_MIL_METEOR_II_CL); };
184  void SetMILSystemTypeToMeteorII1394() { this->SetMILSystemType(VTK_MIL_METEOR_II_1394); };
185  void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); };
186  void SetMILSystemTypeToCoronaII() { this->SetMILSystemType(VTK_MIL_CORONA_II); };
187  void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); };
188  void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); };
189  void SetMILSystemTypeToGenesisPlus() { this->SetMILSystemType(VTK_MIL_GENESIS_PLUS); };
190  void SetMILSystemTypeToOrion() { this->SetMILSystemType(VTK_MIL_ORION); };
191  void SetMILSystemTypeToCronos() { this->SetMILSystemType(VTK_MIL_CRONOS); };
192  void SetMILSystemTypeToOdyssey() { this->SetMILSystemType(VTK_MIL_ODYSSEY); };
194 
195 
198  vtkSetMacro(MILSystemNumber,int);
199  vtkGetMacro(MILSystemNumber,int);
201 
203 
206  vtkSetStringMacro(MILDigitizerDCF);
207  vtkGetStringMacro(MILDigitizerDCF);
209 
211 
214  vtkSetMacro(MILDigitizerNumber,int);
215  vtkGetMacro(MILDigitizerNumber,int);
217 
219 
222  virtual void SetMILErrorMessages(int yesno);
223  vtkBooleanMacro(MILErrorMessages,int);
224  vtkGetMacro(MILErrorMessages,int);
226 
228 
231  vtkSetMacro(MILAppID,long);
232  vtkGetMacro(MILAppID,long);
233  vtkSetMacro(MILSysID,long);
234  vtkGetMacro(MILSysID,long);
235  vtkGetMacro(MILDigID,long);
236  vtkGetMacro(MILBufID,long);
238 
243  void Initialize();
244 
250 
252 
259  void InternalGrab();
261 
262 protected:
265 
266  virtual void AllocateMILDigitizer();
267  virtual void AllocateMILBuffer();
268 
269  virtual char *MILInterpreterForSystem(const char *system);
271 
276 
279  float HueLevel;
281 
282  float BlackLevel;
283  float WhiteLevel;
284 
285  int FrameMaxSize[2];
286 
287  long MILAppID;
288  long MILSysID;
289  long MILDigID;
290  long MILBufID;
291  // long MILDispBufID;
292  // long MILDispID;
293 
296 
299 
301 
304 
306 
313  double CreateTimeStampForFrame(unsigned long frame);
314 
316  unsigned long LastFrameCount;
319 
320 private:
321  vtkMILVideoSource(const vtkMILVideoSource&) VTK_DELETE_FUNCTION;
322  void operator=(const vtkMILVideoSource&) VTK_DELETE_FUNCTION;
323 };
324 
325 #endif
a simple class to control print indentation
Definition: vtkIndent.h:40
Matrox Imaging Library frame grabbers.
virtual void SetHueLevel(float hue)
virtual float GetWhiteLevel()
virtual void SetVideoInput(int input)
Set/Get the video input.
void * OldHookFunction
For internal use only.
void SetMILSystemTypeToMeteorIICL()
virtual void SetWhiteLevel(float value)
virtual void AllocateMILBuffer()
void SetMILSystemTypeToGenesisPlus()
virtual void SetBrightnessLevel(float brightness)
double CreateTimeStampForFrame(unsigned long frame)
Method for updating the virtual clock that accurately times the arrival of each frame,...
virtual float GetBlackLevel()
virtual char * MILInterpreterForSystem(const char *system)
void InternalGrab()
The internal function which actually does the grab.
void SetMILSystemTypeToMeteorII1394()
void SetVideoFormatToNonStandard()
virtual void SetSaturationLevel(float saturation)
virtual void SetContrastLevel(float contrast)
Set/Get the video levels for composite/SVideo: the valid ranges are: Contrast [0.0,...
void Stop()
Standard VCR functionality: Stop recording or playing.
unsigned long LastFrameCount
virtual void SetBlackLevel(float value)
Set/Get the video levels for monochrome/RGB: valid values are between 0.0 and 255....
virtual void SetMILErrorMessages(int yesno)
Set whether to display MIL error messages (default on)
void SetFrameSize(int x, int y, int z)
Request a particular frame size (set the third value to 1).
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual void SetVideoChannel(int channel)
Set/Get the video channel.
void SetOutputFormat(int format)
Request a particular output format (default: VTK_RGB).
void Record()
Standard VCR functionality: Record incoming video.
virtual void SetVideoFormat(int format)
Set/Get the video format.
virtual void AllocateMILDigitizer()
void Grab()
Grab a single video frame.
void Initialize()
Initialize the driver (this is called automatically when the first grab is done).
void ReleaseSystemResources()
Free the driver (this is called automatically inside the destructor).
void Play()
Standard VCR functionality: Play recorded video.
void SetMILSystemTypeToMeteorIIDig()
static vtkMILVideoSource * New()
Superclass of video input devices for VTK.
@ value
Definition: vtkX3D.h:220
#define VTK_MIL_MONO
#define VTK_MIL_CCIR
#define VTK_MIL_SECAM
#define VTK_MIL_CRONOS
#define VTK_MIL_RS170
#define VTK_MIL_NONSTANDARD
#define VTK_MIL_GENESIS_PLUS
#define VTK_MIL_DIGITAL
#define VTK_MIL_METEOR_II_DIG
#define VTK_MIL_ORION
#define VTK_MIL_CORONA_II
#define VTK_MIL_PULSAR
#define VTK_MIL_RGB
#define VTK_MIL_METEOR
#define VTK_MIL_METEOR_II_CL
#define VTK_MIL_COMPOSITE
#define VTK_MIL_METEOR_II_1394
#define VTK_MIL_CORONA
#define VTK_MIL_ODYSSEY
#define VTK_MIL_GENESIS
#define VTK_MIL_METEOR_II
#define VTK_MIL_NTSC
#define VTK_MIL_PAL
#define VTK_MIL_YC
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.