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

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-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 =========================================================================*/
00056 #ifndef __vtkMILVideoSource_h
00057 #define __vtkMILVideoSource_h
00058 
00059 #include "vtkVideoSource.h"
00060 
00061 // digitizer hardware
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 // video inputs: 
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 // video formats:
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   // long MILDispBufID;
00244   // long MILDispID;
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&);  // Not implemented.
00261   void operator=(const vtkMILVideoSource&);  // Not implemented.
00262 };
00263 
00264 #endif

Generated on Thu Mar 28 14:19:24 2002 for VTK by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001