Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Hybrid/vtkMILVideoSource.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkMILVideoSource.h,v $ 00005 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00035 #ifndef __vtkMILVideoSource_h 00036 #define __vtkMILVideoSource_h 00037 00038 #include "vtkVideoSource.h" 00039 00040 // digitizer hardware 00041 #define VTK_MIL_DEFAULT 0 00042 #define VTK_MIL_METEOR "M_SYSTEM_METEOR" 00043 #define VTK_MIL_METEOR_II "M_SYSTEM_METEOR_II" 00044 #define VTK_MIL_METEOR_II_DIG "M_SYSTEM_METEOR_II_DIG" 00045 #define VTK_MIL_METEOR_II_CL "M_SYSTEM_METEOR_II_CL" 00046 #define VTK_MIL_METEOR_II_1394 "M_SYSTEM_METEOR_II_1394" 00047 #define VTK_MIL_CORONA "M_SYSTEM_CORONA" 00048 #define VTK_MIL_CORONA_II "M_SYSTEM_CORONA_II" 00049 #define VTK_MIL_PULSAR "M_SYSTEM_PULSAR" 00050 #define VTK_MIL_GENESIS "M_SYSTEM_GENESIS" 00051 #define VTK_MIL_GENESIS_PLUS "M_SYSTEM_GENESIS_PLUS" 00052 #define VTK_MIL_ORION "M_SYSTEM_ORION" 00053 #define VTK_MIL_CRONOS "M_SYSTEM_CRONOS" 00054 #define VTK_MIL_ODYSSEY "M_SYSTEM_ODYSSEY" 00055 00056 // video inputs: 00057 #define VTK_MIL_MONO 0 00058 #define VTK_MIL_COMPOSITE 1 00059 #define VTK_MIL_YC 2 00060 #define VTK_MIL_RGB 3 00061 #define VTK_MIL_DIGITAL 4 00062 00063 // video formats: 00064 #define VTK_MIL_RS170 0 00065 #define VTK_MIL_NTSC 1 00066 #define VTK_MIL_CCIR 2 00067 #define VTK_MIL_PAL 3 00068 #define VTK_MIL_SECAM 4 00069 #define VTK_MIL_NONSTANDARD 5 00070 00071 class VTK_HYBRID_EXPORT vtkMILVideoSource : public vtkVideoSource 00072 { 00073 public: 00074 static vtkMILVideoSource *New(); 00075 vtkTypeRevisionMacro(vtkMILVideoSource,vtkVideoSource); 00076 void PrintSelf(ostream& os, vtkIndent indent); 00077 00079 void Record(); 00080 00082 void Play(); 00083 00085 void Stop(); 00086 00088 void Grab(); 00089 00091 void SetFrameSize(int x, int y, int z); 00092 00094 void SetOutputFormat(int format); 00095 00097 00098 virtual void SetVideoChannel(int channel); 00099 vtkGetMacro(VideoChannel, int); 00101 00103 00104 virtual void SetVideoFormat(int format); 00105 void SetVideoFormatToNTSC() { this->SetVideoFormat(VTK_MIL_NTSC); }; 00106 void SetVideoFormatToPAL() { this->SetVideoFormat(VTK_MIL_PAL); }; 00107 void SetVideoFormatToSECAM() { this->SetVideoFormat(VTK_MIL_SECAM); }; 00108 void SetVideoFormatToRS170() { this->SetVideoFormat(VTK_MIL_RS170); }; 00109 void SetVideoFormatToCCIR() { this->SetVideoFormat(VTK_MIL_CCIR); }; 00110 void SetVideoFormatToNonStandard() { 00111 this->SetVideoFormat(VTK_MIL_NONSTANDARD); }; 00112 vtkGetMacro(VideoFormat,int); 00114 00116 00117 virtual void SetVideoInput(int input); 00118 void SetVideoInputToMono() { this->SetVideoInput(VTK_MIL_MONO); }; 00119 void SetVideoInputToComposite() {this->SetVideoInput(VTK_MIL_COMPOSITE);}; 00120 void SetVideoInputToYC() { this->SetVideoInput(VTK_MIL_YC); }; 00121 void SetVideoInputToRGB() { this->SetVideoInput(VTK_MIL_RGB); }; 00122 void SetVideoInputToDigital() { this->SetVideoInput(VTK_MIL_DIGITAL); }; 00123 vtkGetMacro(VideoInput,int); 00125 00127 00130 virtual void SetContrastLevel(float contrast); 00131 vtkGetMacro(ContrastLevel,float); 00132 virtual void SetBrightnessLevel(float brightness); 00133 vtkGetMacro(BrightnessLevel,float); 00134 virtual void SetHueLevel(float hue); 00135 vtkGetMacro(HueLevel,float); 00136 virtual void SetSaturationLevel(float saturation); 00137 vtkGetMacro(SaturationLevel,float); 00139 00141 00143 virtual void SetBlackLevel(float value); 00144 virtual float GetBlackLevel() { 00145 return this->BlackLevel; }; 00146 virtual void SetWhiteLevel(float value); 00147 virtual float GetWhiteLevel() { 00148 return this->WhiteLevel; }; 00150 00152 00154 vtkSetStringMacro(MILSystemType); 00155 vtkGetStringMacro(MILSystemType); 00156 void SetMILSystemTypeToMeteor() { this->SetMILSystemType(VTK_MIL_METEOR); }; 00157 void SetMILSystemTypeToMeteorII() { this->SetMILSystemType(VTK_MIL_METEOR_II); }; 00158 void SetMILSystemTypeToMeteorIIDig() { this->SetMILSystemType(VTK_MIL_METEOR_II_DIG); }; 00159 void SetMILSystemTypeToMeteorIICL() { this->SetMILSystemType(VTK_MIL_METEOR_II_CL); }; 00160 void SetMILSystemTypeToMeteorII1394() { this->SetMILSystemType(VTK_MIL_METEOR_II_1394); }; 00161 void SetMILSystemTypeToCorona() { this->SetMILSystemType(VTK_MIL_CORONA); }; 00162 void SetMILSystemTypeToCoronaII() { this->SetMILSystemType(VTK_MIL_CORONA_II); }; 00163 void SetMILSystemTypeToPulsar() { this->SetMILSystemType(VTK_MIL_PULSAR); }; 00164 void SetMILSystemTypeToGenesis() { this->SetMILSystemType(VTK_MIL_GENESIS); }; 00165 void SetMILSystemTypeToGenesisPlus() { this->SetMILSystemType(VTK_MIL_GENESIS_PLUS); }; 00166 void SetMILSystemTypeToOrion() { this->SetMILSystemType(VTK_MIL_ORION); }; 00167 void SetMILSystemTypeToCronos() { this->SetMILSystemType(VTK_MIL_CRONOS); }; 00168 void SetMILSystemTypeToOdyssey() { this->SetMILSystemType(VTK_MIL_ODYSSEY); }; 00169 // Description: 00170 // Set the system number if you have multiple systems of the same type 00171 vtkSetMacro(MILSystemNumber,int); 00172 vtkGetMacro(MILSystemNumber,int); 00174 00176 00177 vtkSetStringMacro(MILDigitizerDCF); 00178 vtkGetStringMacro(MILDigitizerDCF); 00180 00182 00183 vtkSetMacro(MILDigitizerNumber,int); 00184 vtkGetMacro(MILDigitizerNumber,int); 00186 00188 00189 virtual void SetMILErrorMessages(int yesno); 00190 vtkBooleanMacro(MILErrorMessages,int); 00191 vtkGetMacro(MILErrorMessages,int); 00193 00195 00196 vtkSetMacro(MILAppID,long); 00197 vtkGetMacro(MILAppID,long); 00198 vtkSetMacro(MILSysID,long); 00199 vtkGetMacro(MILSysID,long); 00200 vtkGetMacro(MILDigID,long); 00201 vtkGetMacro(MILBufID,long); 00203 00206 void Initialize(); 00207 00209 void ReleaseSystemResources(); 00210 00212 00213 void *OldHookFunction; 00214 void *OldUserDataPtr; 00215 int FrameCounter; 00216 int ForceGrab; 00217 void InternalGrab(); 00219 00220 protected: 00221 vtkMILVideoSource(); 00222 ~vtkMILVideoSource(); 00223 00224 virtual void AllocateMILDigitizer(); 00225 virtual void AllocateMILBuffer(); 00226 00227 virtual void *MILInterpreterForSystem(const char *system); 00228 char *MILInterpreterDLL; 00229 00230 int VideoChannel; 00231 int VideoInput; 00232 int VideoInputForColor; 00233 int VideoFormat; 00234 00235 float ContrastLevel; 00236 float BrightnessLevel; 00237 float HueLevel; 00238 float SaturationLevel; 00239 00240 float BlackLevel; 00241 float WhiteLevel; 00242 00243 int FrameMaxSize[2]; 00244 00245 long MILAppID; 00246 long MILSysID; 00247 long MILDigID; 00248 long MILBufID; 00249 // long MILDispBufID; 00250 // long MILDispID; 00251 00252 char *MILSystemType; 00253 int MILSystemNumber; 00254 00255 int MILDigitizerNumber; 00256 char *MILDigitizerDCF; 00257 00258 int MILErrorMessages; 00259 00260 int MILAppInternallyAllocated; 00261 int MILSysInternallyAllocated; 00262 00263 int FatalMILError; 00264 00268 double CreateTimeStampForFrame(unsigned long frame); 00269 00270 double LastTimeStamp; 00271 unsigned long LastFrameCount; 00272 double EstimatedFramePeriod; 00273 double NextFramePeriod; 00274 00275 private: 00276 vtkMILVideoSource(const vtkMILVideoSource&); // Not implemented. 00277 void operator=(const vtkMILVideoSource&); // Not implemented. 00278 }; 00279 00280 #endif