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
00056 #ifndef __vtkMILVideoSource_h
00057 #define __vtkMILVideoSource_h
00058
00059 #include "vtkVideoSource.h"
00060
00061
00062 #define VTK_MIL_DEFAULT 0
00063 #define VTK_MIL_METEOR 1
00064 #define VTK_MIL_METEOR_II 2
00065 #define VTK_MIL_METEOR_II_DIG 3
00066 #define VTK_MIL_CORONA 4
00067 #define VTK_MIL_PULSAR 5
00068 #define VTK_MIL_GENESIS 6
00069
00070
00071 #define VTK_MIL_MONO 0
00072 #define VTK_MIL_COMPOSITE 1
00073 #define VTK_MIL_YC 2
00074 #define VTK_MIL_RGB 3
00075 #define VTK_MIL_DIGITAL 4
00076
00077
00078 #define VTK_MIL_RS170 0
00079 #define VTK_MIL_NTSC 1
00080 #define VTK_MIL_CCIR 2
00081 #define VTK_MIL_PAL 3
00082 #define VTK_MIL_SECAM 4
00083 #define VTK_MIL_NONSTANDARD 5
00084
00085 class VTK_HYBRID_EXPORT vtkMILVideoSource : public vtkVideoSource
00086 {
00087 public:
00088 static vtkMILVideoSource *New();
00089 vtkTypeMacro(vtkMILVideoSource,vtkVideoSource);
00090 void PrintSelf(ostream& os, vtkIndent indent);
00091
00093 void Record();
00094
00096 void Play();
00097
00099 void Stop();
00100
00102 void Grab();
00103
00105 void SetFrameSize(int x, int y, int z);
00106
00108 void SetOutputFormat(int format);
00109
00111
00112 virtual void SetVideoChannel(int channel);
00113 vtkGetMacro(VideoChannel, int);
00115
00117
00118 virtual void SetVideoFormat(int format);
00119 void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); };
00120 void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); };
00121 void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); };
00122 void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); };
00123 void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); };
00124 void SetVideoFormatToNonStandard() {
00125 this->SetVideoFormat(VTK_MIL_NONSTANDARD); };
00126 vtkGetMacro(VideoFormat,int);
00128
00130
00131 virtual void SetVideoInput(int input);
00132 void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); };
00133 void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);};
00134 void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); };
00135 void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); };
00136 void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); };
00137 vtkGetMacro(VideoInput,int);
00139
00141
00143 virtual void SetContrastLevel(float contrast);
00144 vtkGetMacro(ContrastLevel,float);
00145 virtual void SetBrightnessLevel(float brightness);
00146 vtkGetMacro(BrightnessLevel,float);
00147 virtual void SetHueLevel(float hue);
00148 vtkGetMacro(HueLevel,float);
00149 virtual void SetSaturationLevel(float saturation);
00150 vtkGetMacro(SaturationLevel,float);
00152
00154
00156 vtkSetMacro(MILSystemType,int);
00157 vtkGetMacro(MILSystemType,int);
00158 void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); };
00159 void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); };
00160 void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); };
00161 void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); };
00162 void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); };
00163 void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); };
00165
00167
00168 vtkSetMacro(MILSystemNumber,int);
00169 vtkGetMacro(MILSystemNumber,int);
00171
00173
00174 vtkSetStringMacro(MILDigitizerDCF);
00175 vtkGetStringMacro(MILDigitizerDCF);
00177
00179
00180 vtkSetMacro(MILDigitizerNumber,int);
00181 vtkGetMacro(MILDigitizerNumber,int);
00183
00185
00186 virtual void SetMILErrorMessages(int yesno);
00187 vtkBooleanMacro(MILErrorMessages,int);
00188 vtkGetMacro(MILErrorMessages,int);
00190
00192
00193 vtkSetMacro(MILAppID,long);
00194 vtkGetMacro(MILAppID,long);
00195 vtkSetMacro(MILSysID,long);
00196 vtkGetMacro(MILSysID,long);
00197 vtkGetMacro(MILDigID,long);
00198 vtkGetMacro(MILBufID,long);
00200
00203 void Initialize();
00204
00206 void ReleaseSystemResources();
00207
00209
00210 void *OldHookFunction;
00211 void *OldUserDataPtr;
00212 int FrameCounter;
00213 int ForceGrab;
00214 void InternalGrab();
00216
00217 protected:
00218 vtkMILVideoSource();
00219 ~vtkMILVideoSource();
00220
00221 virtual void AllocateMILDigitizer();
00222 virtual void AllocateMILBuffer();
00223
00224 virtual void *MILInterpreterForSystem(int system);
00225 char *MILInterpreterDLL;
00226
00227 int VideoChannel;
00228 int VideoInput;
00229 int VideoInputForColor;
00230 int VideoFormat;
00231
00232 float ContrastLevel;
00233 float BrightnessLevel;
00234 float HueLevel;
00235 float SaturationLevel;
00236
00237 int FrameMaxSize[2];
00238
00239 long MILAppID;
00240 long MILSysID;
00241 long MILDigID;
00242 long MILBufID;
00243
00244
00245
00246 int MILSystemType;
00247 int MILSystemNumber;
00248
00249 int MILDigitizerNumber;
00250 char *MILDigitizerDCF;
00251
00252 int MILErrorMessages;
00253
00254 int MILAppInternallyAllocated;
00255 int MILSysInternallyAllocated;
00256
00257 int FatalMILError;
00258
00259 private:
00260 vtkMILVideoSource(const vtkMILVideoSource&);
00261 void operator=(const vtkMILVideoSource&);
00262 };
00263
00264 #endif