00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00055 #ifndef __vtkMILVideoSource_h
00056 #define __vtkMILVideoSource_h
00057
00058 #include "vtkVideoSource.h"
00059
00060
00061 #define VTK_MIL_DEFAULT 0
00062 #define VTK_MIL_METEOR 1
00063 #define VTK_MIL_METEOR_II 2
00064 #define VTK_MIL_METEOR_II_DIG 3
00065 #define VTK_MIL_CORONA 4
00066 #define VTK_MIL_PULSAR 5
00067 #define VTK_MIL_GENESIS 6
00068
00069
00070 #define VTK_MIL_MONO 0
00071 #define VTK_MIL_COMPOSITE 1
00072 #define VTK_MIL_YC 2
00073 #define VTK_MIL_RGB 3
00074 #define VTK_MIL_DIGITAL 4
00075
00076
00077 #define VTK_MIL_RS170 0
00078 #define VTK_MIL_NTSC 1
00079 #define VTK_MIL_CCIR 2
00080 #define VTK_MIL_PAL 3
00081 #define VTK_MIL_SECAM 4
00082 #define VTK_MIL_NONSTANDARD 5
00083
00084 class VTK_EXPORT vtkMILVideoSource : public vtkVideoSource
00085 {
00086 public:
00087 static vtkMILVideoSource *New();
00088 vtkTypeMacro(vtkMILVideoSource,vtkVideoSource);
00089 void PrintSelf(ostream& os, vtkIndent indent);
00090
00092 void Initialize();
00093 void ReleaseSystemResources();
00094
00095 void Grab(int n);
00096 void Grab() { this->Grab(1); };
00097 void Play();
00098 void Stop();
00099
00100 void SetFrameSize(int x, int y, int z);
00101 void SetOutputFormat(int format);
00102
00104 virtual void SetVideoChannel(int channel);
00105 vtkGetMacro(VideoChannel, int);
00106
00108 virtual void SetVideoFormat(int format);
00109 void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); };
00110 void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); };
00111 void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); };
00112 void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); };
00113 void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); };
00114 void SetVideoFormatToNonStandard() {
00115 this->SetVideoFormat(VTK_MIL_NONSTANDARD); };
00116 vtkGetMacro(VideoFormat,int);
00117
00119 virtual void SetVideoInput(int input);
00120 void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); };
00121 void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);};
00122 void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); };
00123 void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); };
00124 void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); };
00125 vtkGetMacro(VideoInput,int);
00126
00129 virtual void SetContrastLevel(float contrast);
00130 vtkGetMacro(ContrastLevel,float);
00131 virtual void SetBrightnessLevel(float brightness);
00132 vtkGetMacro(BrightnessLevel,float);
00133 virtual void SetHueLevel(float hue);
00134 vtkGetMacro(HueLevel,float);
00135 virtual void SetSaturationLevel(float saturation);
00136 vtkGetMacro(SaturationLevel,float);
00137
00140 vtkSetMacro(MILSystemType,int);
00141 vtkGetMacro(MILSystemType,int);
00142 void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); };
00143 void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); };
00144 void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); };
00145 void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); };
00146 void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); };
00147 void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); };
00148
00150 vtkSetMacro(MILSystemNumber,int);
00151 vtkGetMacro(MILSystemNumber,int);
00152
00154 vtkSetStringMacro(MILDigitizerDCF);
00155 vtkGetStringMacro(MILDigitizerDCF);
00156
00158 vtkSetMacro(MILDigitizerNumber,int);
00159 vtkGetMacro(MILDigitizerNumber,int);
00160
00162 virtual void SetMILErrorMessages(int yesno);
00163 vtkBooleanMacro(MILErrorMessages,int);
00164 vtkGetMacro(MILErrorMessages,int);
00165
00167 vtkSetMacro(MILAppID,long);
00168 vtkGetMacro(MILAppID,long);
00169 vtkSetMacro(MILSysID,long);
00170 vtkGetMacro(MILSysID,long);
00171 vtkGetMacro(MILDigID,long);
00172 vtkGetMacro(MILBufID,long);
00173
00175 void *OldHookFunction;
00176 void *OldUserDataPtr;
00177 int FrameCounter;
00178 int ForceGrab;
00179 void InternalGrab();
00180
00181 protected:
00182 vtkMILVideoSource();
00183 ~vtkMILVideoSource();
00184 vtkMILVideoSource(const vtkMILVideoSource&) {};
00185 void operator=(const vtkMILVideoSource&) {};
00186
00187 virtual void AllocateMILDigitizer();
00188 virtual void AllocateMILBuffer();
00189
00190 virtual void *MILInterpreterForSystem(int system);
00191 char *MILInterpreterDLL;
00192
00193 int VideoChannel;
00194 int VideoInput;
00195 int VideoInputForColor;
00196 int VideoFormat;
00197
00198 float ContrastLevel;
00199 float BrightnessLevel;
00200 float HueLevel;
00201 float SaturationLevel;
00202
00203 int FrameMaxSize[2];
00204
00205 long MILAppID;
00206 long MILSysID;
00207 long MILDigID;
00208 long MILBufID;
00209
00210
00211
00212 int MILSystemType;
00213 int MILSystemNumber;
00214
00215 int MILDigitizerNumber;
00216 char *MILDigitizerDCF;
00217
00218 int MILErrorMessages;
00219
00220 int MILAppInternallyAllocated;
00221 int MILSysInternallyAllocated;
00222
00223 int FatalMILError;
00224 };
00225
00226 #endif