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

contrib/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-2001 Ken Martin, Will Schroeder, Bill Lorensen 
00008 All rights reserved.
00009 
00010 Redistribution and use in source and binary forms, with or without
00011 modification, are permitted provided that the following conditions are met:
00012 
00013  * Redistributions of source code must retain the above copyright notice,
00014    this list of conditions and the following disclaimer.
00015 
00016  * Redistributions in binary form must reproduce the above copyright notice,
00017    this list of conditions and the following disclaimer in the documentation
00018    and/or other materials provided with the distribution.
00019 
00020  * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
00021    of any contributors may be used to endorse or promote products derived
00022    from this software without specific prior written permission.
00023 
00024  * Modified source versions must be plainly marked as such, and must not be
00025    misrepresented as being the original software.
00026 
00027 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
00028 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00029 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00030 ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
00031 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
00032 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
00033 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
00034 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00035 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
00036 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00037 
00038 =========================================================================*/
00055 #ifndef __vtkMILVideoSource_h
00056 #define __vtkMILVideoSource_h
00057 
00058 #include "vtkVideoSource.h"
00059 
00060 // digitizer hardware
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 // video inputs: 
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 // video formats:
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   // long MILDispBufID;
00210   // long MILDispID;
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

Generated on Wed Nov 21 12:26:55 2001 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001