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