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 =========================================================================*/
31 #ifndef vtkMILVideoSource_h
32 #define vtkMILVideoSource_h
33 
34 #include "vtkIOVideoModule.h" // For export macro
35 #include "vtkVideoSource.h"
36 
37 // digitizer hardware
38 #define VTK_MIL_DEFAULT 0
39 #define VTK_MIL_METEOR "M_SYSTEM_METEOR"
40 #define VTK_MIL_METEOR_II "M_SYSTEM_METEOR_II"
41 #define VTK_MIL_METEOR_II_DIG "M_SYSTEM_METEOR_II_DIG"
42 #define VTK_MIL_METEOR_II_CL "M_SYSTEM_METEOR_II_CL"
43 #define VTK_MIL_METEOR_II_1394 "M_SYSTEM_METEOR_II_1394"
44 #define VTK_MIL_CORONA "M_SYSTEM_CORONA"
45 #define VTK_MIL_CORONA_II "M_SYSTEM_CORONA_II"
46 #define VTK_MIL_PULSAR "M_SYSTEM_PULSAR"
47 #define VTK_MIL_GENESIS "M_SYSTEM_GENESIS"
48 #define VTK_MIL_GENESIS_PLUS "M_SYSTEM_GENESIS_PLUS"
49 #define VTK_MIL_ORION "M_SYSTEM_ORION"
50 #define VTK_MIL_CRONOS "M_SYSTEM_CRONOS"
51 #define VTK_MIL_ODYSSEY "M_SYSTEM_ODYSSEY"
52 
53 // video inputs:
54 #define VTK_MIL_MONO 0
55 #define VTK_MIL_COMPOSITE 1
56 #define VTK_MIL_YC 2
57 #define VTK_MIL_RGB 3
58 #define VTK_MIL_DIGITAL 4
59 
60 // video formats:
61 #define VTK_MIL_RS170 0
62 #define VTK_MIL_NTSC 1
63 #define VTK_MIL_CCIR 2
64 #define VTK_MIL_PAL 3
65 #define VTK_MIL_SECAM 4
66 #define VTK_MIL_NONSTANDARD 5
67 
69 {
70 public:
71  static vtkMILVideoSource *New();
73  void PrintSelf(ostream& os, vtkIndent indent);
74 
76  void Record();
77 
79  void Play();
80 
82  void Stop();
83 
85  void Grab();
86 
88  void SetFrameSize(int x, int y, int z);
89 
91  void SetOutputFormat(int format);
92 
94 
95  virtual void SetVideoChannel(int channel);
96  vtkGetMacro(VideoChannel, int);
98 
100 
101  virtual void SetVideoFormat(int format);
102  void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); };
103  void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); };
104  void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); };
105  void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); };
106  void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); };
108  this->SetVideoFormat(VTK_MIL_NONSTANDARD); };
109  vtkGetMacro(VideoFormat,int);
111 
113 
114  virtual void SetVideoInput(int input);
115  void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); };
116  void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);};
117  void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); };
118  void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); };
119  void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); };
120  vtkGetMacro(VideoInput,int);
122 
124 
127  virtual void SetContrastLevel(float contrast);
128  vtkGetMacro(ContrastLevel,float);
129  virtual void SetBrightnessLevel(float brightness);
130  vtkGetMacro(BrightnessLevel,float);
131  virtual void SetHueLevel(float hue);
132  vtkGetMacro(HueLevel,float);
133  virtual void SetSaturationLevel(float saturation);
134  vtkGetMacro(SaturationLevel,float);
136 
138 
140  virtual void SetBlackLevel(float value);
141  virtual float GetBlackLevel() {
142  return this->BlackLevel; };
143  virtual void SetWhiteLevel(float value);
144  virtual float GetWhiteLevel() {
145  return this->WhiteLevel; };
147 
149 
151  vtkSetStringMacro(MILSystemType);
152  vtkGetStringMacro(MILSystemType);
153  void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); };
154  void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); };
155  void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); };
156  void SetMILSystemTypeToMeteorIICL() { this->SetMILSystemType(VTK_MIL_METEOR_II_CL); };
157  void SetMILSystemTypeToMeteorII1394() { this->SetMILSystemType(VTK_MIL_METEOR_II_1394); };
158  void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); };
159  void SetMILSystemTypeToCoronaII() { this->SetMILSystemType(VTK_MIL_CORONA_II); };
160  void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); };
161  void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); };
162  void SetMILSystemTypeToGenesisPlus() { this->SetMILSystemType(VTK_MIL_GENESIS_PLUS); };
163  void SetMILSystemTypeToOrion() { this->SetMILSystemType(VTK_MIL_ORION); };
164  void SetMILSystemTypeToCronos() { this->SetMILSystemType(VTK_MIL_CRONOS); };
165  void SetMILSystemTypeToOdyssey() { this->SetMILSystemType(VTK_MIL_ODYSSEY); };
167 
168 
169  vtkSetMacro(MILSystemNumber,int);
170  vtkGetMacro(MILSystemNumber,int);
172 
174 
175  vtkSetStringMacro(MILDigitizerDCF);
176  vtkGetStringMacro(MILDigitizerDCF);
178 
180 
181  vtkSetMacro(MILDigitizerNumber,int);
182  vtkGetMacro(MILDigitizerNumber,int);
184 
186 
187  virtual void SetMILErrorMessages(int yesno);
188  vtkBooleanMacro(MILErrorMessages,int);
189  vtkGetMacro(MILErrorMessages,int);
191 
193 
194  vtkSetMacro(MILAppID,long);
195  vtkGetMacro(MILAppID,long);
196  vtkSetMacro(MILSysID,long);
197  vtkGetMacro(MILSysID,long);
198  vtkGetMacro(MILDigID,long);
199  vtkGetMacro(MILBufID,long);
201 
204  void Initialize();
205 
207  void ReleaseSystemResources();
208 
210 
215  void InternalGrab();
217 
218 protected:
221 
222  virtual void AllocateMILDigitizer();
223  virtual void AllocateMILBuffer();
224 
225  virtual char *MILInterpreterForSystem(const char *system);
227 
232 
235  float HueLevel;
237 
238  float BlackLevel;
239  float WhiteLevel;
240 
241  int FrameMaxSize[2];
242 
243  long MILAppID;
244  long MILSysID;
245  long MILDigID;
246  long MILBufID;
247  // long MILDispBufID;
248  // long MILDispID;
249 
252 
255 
257 
260 
262 
266  double CreateTimeStampForFrame(unsigned long frame);
267 
269  unsigned long LastFrameCount;
272 
273 private:
274  vtkMILVideoSource(const vtkMILVideoSource&); // Not implemented.
275  void operator=(const vtkMILVideoSource&); // Not implemented.
276 };
277 
278 #endif
#define VTK_MIL_METEOR
virtual void Stop()
#define VTK_MIL_METEOR_II_DIG
void SetMILSystemTypeToMeteorIIDig()
virtual void Initialize()
void SetMILSystemTypeToMeteorIICL()
#define VTK_MIL_METEOR_II_CL
#define VTK_MIL_CORONA
#define VTK_MIL_DIGITAL
Matrox Imaging Library frame grabbers.
Superclass of video input devices for VTK.
#define VTK_MIL_COMPOSITE
#define VTKIOVIDEO_EXPORT
#define VTK_MIL_CCIR
#define VTK_MIL_PULSAR
virtual void ReleaseSystemResources()
#define VTK_MIL_NONSTANDARD
#define VTK_MIL_PAL
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void Record()
virtual float GetWhiteLevel()
void SetMILSystemTypeToMeteorII1394()
#define VTK_MIL_RS170
#define VTK_MIL_GENESIS_PLUS
#define VTK_MIL_NTSC
#define VTK_MIL_RGB
#define VTK_MIL_METEOR_II
#define VTK_MIL_CRONOS
virtual void SetOutputFormat(int format)
static vtkVideoSource * New()
#define VTK_MIL_CORONA_II
virtual float GetBlackLevel()
#define VTK_MIL_ORION
virtual void SetFrameSize(int x, int y, int z)
unsigned long LastFrameCount
#define VTK_MIL_ODYSSEY
virtual void Play()
virtual void Grab()
#define VTK_MIL_METEOR_II_1394
#define VTK_MIL_GENESIS
#define VTK_MIL_SECAM
#define VTK_MIL_YC
void PrintSelf(ostream &os, vtkIndent indent)
void SetMILSystemTypeToGenesisPlus()
void SetVideoFormatToNonStandard()
virtual void InternalGrab()
#define VTK_MIL_MONO