vtkMILVideoSource.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00041 #ifndef __vtkMILVideoSource_h
00042 #define __vtkMILVideoSource_h
00043
00044 #include "vtkVideoSource.h"
00045
00046
00047 #define VTK_MIL_DEFAULT 0
00048 #define VTK_MIL_METEOR "M_SYSTEM_METEOR"
00049 #define VTK_MIL_METEOR_II "M_SYSTEM_METEOR_II"
00050 #define VTK_MIL_METEOR_II_DIG "M_SYSTEM_METEOR_II_DIG"
00051 #define VTK_MIL_METEOR_II_CL "M_SYSTEM_METEOR_II_CL"
00052 #define VTK_MIL_METEOR_II_1394 "M_SYSTEM_METEOR_II_1394"
00053 #define VTK_MIL_CORONA "M_SYSTEM_CORONA"
00054 #define VTK_MIL_CORONA_II "M_SYSTEM_CORONA_II"
00055 #define VTK_MIL_PULSAR "M_SYSTEM_PULSAR"
00056 #define VTK_MIL_GENESIS "M_SYSTEM_GENESIS"
00057 #define VTK_MIL_GENESIS_PLUS "M_SYSTEM_GENESIS_PLUS"
00058 #define VTK_MIL_ORION "M_SYSTEM_ORION"
00059 #define VTK_MIL_CRONOS "M_SYSTEM_CRONOS"
00060 #define VTK_MIL_ODYSSEY "M_SYSTEM_ODYSSEY"
00061
00062
00063 #define VTK_MIL_MONO 0
00064 #define VTK_MIL_COMPOSITE 1
00065 #define VTK_MIL_YC 2
00066 #define VTK_MIL_RGB 3
00067 #define VTK_MIL_DIGITAL 4
00068
00069
00070 #define VTK_MIL_RS170 0
00071 #define VTK_MIL_NTSC 1
00072 #define VTK_MIL_CCIR 2
00073 #define VTK_MIL_PAL 3
00074 #define VTK_MIL_SECAM 4
00075 #define VTK_MIL_NONSTANDARD 5
00076
00077 class VTK_HYBRID_EXPORT vtkMILVideoSource : public vtkVideoSource
00078 {
00079 public:
00080 static vtkMILVideoSource *New();
00081 vtkTypeRevisionMacro(vtkMILVideoSource,vtkVideoSource);
00082 void PrintSelf(ostream& os, vtkIndent indent);
00083
00085 void Record();
00086
00088 void Play();
00089
00091 void Stop();
00092
00094 void Grab();
00095
00097 void SetFrameSize(int x, int y, int z);
00098
00100 void SetOutputFormat(int format);
00101
00103
00104 virtual void SetVideoChannel(int channel);
00105 vtkGetMacro(VideoChannel, int);
00107
00109
00110 virtual void SetVideoFormat(int format);
00111 void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); };
00112 void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); };
00113 void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); };
00114 void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); };
00115 void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); };
00116 void SetVideoFormatToNonStandard() {
00117 this->SetVideoFormat(VTK_MIL_NONSTANDARD); };
00118 vtkGetMacro(VideoFormat,int);
00120
00122
00123 virtual void SetVideoInput(int input);
00124 void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); };
00125 void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);};
00126 void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); };
00127 void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); };
00128 void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); };
00129 vtkGetMacro(VideoInput,int);
00131
00133
00136 virtual void SetContrastLevel(float contrast);
00137 vtkGetMacro(ContrastLevel,float);
00138 virtual void SetBrightnessLevel(float brightness);
00139 vtkGetMacro(BrightnessLevel,float);
00140 virtual void SetHueLevel(float hue);
00141 vtkGetMacro(HueLevel,float);
00142 virtual void SetSaturationLevel(float saturation);
00143 vtkGetMacro(SaturationLevel,float);
00145
00147
00149 virtual void SetBlackLevel(float value);
00150 virtual float GetBlackLevel() {
00151 return this->BlackLevel; };
00152 virtual void SetWhiteLevel(float value);
00153 virtual float GetWhiteLevel() {
00154 return this->WhiteLevel; };
00156
00158
00160 vtkSetStringMacro(MILSystemType);
00161 vtkGetStringMacro(MILSystemType);
00162 void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); };
00163 void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); };
00164 void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); };
00165 void SetMILSystemTypeToMeteorIICL() { this->SetMILSystemType(VTK_MIL_METEOR_II_CL); };
00166 void SetMILSystemTypeToMeteorII1394() { this->SetMILSystemType(VTK_MIL_METEOR_II_1394); };
00167 void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); };
00168 void SetMILSystemTypeToCoronaII() { this->SetMILSystemType(VTK_MIL_CORONA_II); };
00169 void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); };
00170 void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); };
00171 void SetMILSystemTypeToGenesisPlus() { this->SetMILSystemType(VTK_MIL_GENESIS_PLUS); };
00172 void SetMILSystemTypeToOrion() { this->SetMILSystemType(VTK_MIL_ORION); };
00173 void SetMILSystemTypeToCronos() { this->SetMILSystemType(VTK_MIL_CRONOS); };
00174 void SetMILSystemTypeToOdyssey() { this->SetMILSystemType(VTK_MIL_ODYSSEY); };
00175
00176
00177 vtkSetMacro(MILSystemNumber,int);
00178 vtkGetMacro(MILSystemNumber,int);
00180
00182
00183 vtkSetStringMacro(MILDigitizerDCF);
00184 vtkGetStringMacro(MILDigitizerDCF);
00186
00188
00189 vtkSetMacro(MILDigitizerNumber,int);
00190 vtkGetMacro(MILDigitizerNumber,int);
00192
00194
00195 virtual void SetMILErrorMessages(int yesno);
00196 vtkBooleanMacro(MILErrorMessages,int);
00197 vtkGetMacro(MILErrorMessages,int);
00199
00201
00202 vtkSetMacro(MILAppID,long);
00203 vtkGetMacro(MILAppID,long);
00204 vtkSetMacro(MILSysID,long);
00205 vtkGetMacro(MILSysID,long);
00206 vtkGetMacro(MILDigID,long);
00207 vtkGetMacro(MILBufID,long);
00209
00212 void Initialize();
00213
00215 void ReleaseSystemResources();
00216
00218
00219 void *OldHookFunction;
00220 void *OldUserDataPtr;
00221 int FrameCounter;
00222 int ForceGrab;
00223 void InternalGrab();
00225
00226 protected:
00227 vtkMILVideoSource();
00228 ~vtkMILVideoSource();
00229
00230 virtual void AllocateMILDigitizer();
00231 virtual void AllocateMILBuffer();
00232
00233 virtual void *MILInterpreterForSystem(const char *system);
00234 char *MILInterpreterDLL;
00235
00236 int VideoChannel;
00237 int VideoInput;
00238 int VideoInputForColor;
00239 int VideoFormat;
00240
00241 float ContrastLevel;
00242 float BrightnessLevel;
00243 float HueLevel;
00244 float SaturationLevel;
00245
00246 float BlackLevel;
00247 float WhiteLevel;
00248
00249 int FrameMaxSize[2];
00250
00251 long MILAppID;
00252 long MILSysID;
00253 long MILDigID;
00254 long MILBufID;
00255
00256
00257
00258 char *MILSystemType;
00259 int MILSystemNumber;
00260
00261 int MILDigitizerNumber;
00262 char *MILDigitizerDCF;
00263
00264 int MILErrorMessages;
00265
00266 int MILAppInternallyAllocated;
00267 int MILSysInternallyAllocated;
00268
00269 int FatalMILError;
00270
00274 double CreateTimeStampForFrame(unsigned long frame);
00275
00276 double LastTimeStamp;
00277 unsigned long LastFrameCount;
00278 double EstimatedFramePeriod;
00279 double NextFramePeriod;
00280
00281 private:
00282 vtkMILVideoSource(const vtkMILVideoSource&);
00283 void operator=(const vtkMILVideoSource&);
00284 };
00285
00286 #endif