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

vtkWindowToImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkWindowToImageFilter.h,v $
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00062 #ifndef __vtkWindowToImageFilter_h
00063 #define __vtkWindowToImageFilter_h
00064 
00065 #include "vtkAlgorithm.h"
00066 #include "vtkImageData.h" // makes things a bit easier
00067 
00068 // VTK_RGB and VTK_RGBA are defined in system includes
00069 #define VTK_ZBUFFER 5
00070 
00071 class vtkWindow;
00072 
00073 class VTK_RENDERING_EXPORT vtkWindowToImageFilter : public vtkAlgorithm
00074 {
00075 public:
00076   static vtkWindowToImageFilter *New();
00077 
00078   vtkTypeRevisionMacro(vtkWindowToImageFilter,vtkAlgorithm);
00079   void PrintSelf(ostream& os, vtkIndent indent);   
00080 
00082   void SetInput(vtkWindow *input);
00083 
00085 
00087   vtkGetObjectMacro(Input,vtkWindow);
00089 
00091 
00092   vtkSetClampMacro(Magnification,int,1,2048);
00093   vtkGetMacro(Magnification,int);
00095 
00097 
00099   vtkBooleanMacro(ReadFrontBuffer, int);
00100   vtkGetMacro(ReadFrontBuffer, int);
00101   vtkSetMacro(ReadFrontBuffer, int);
00103   
00105 
00107   vtkBooleanMacro(ShouldRerender, int);
00108   vtkSetMacro(ShouldRerender, int);
00109   vtkGetMacro(ShouldRerender, int);
00111   
00113 
00115   vtkSetVector4Macro(Viewport,double);
00116   vtkGetVectorMacro(Viewport,double,4);
00118 
00120 
00124   vtkSetMacro(InputBufferType, int);
00125   vtkGetMacro(InputBufferType, int);
00126   void SetInputBufferTypeToRGB() {this->SetInputBufferType(VTK_RGB);};
00127   void SetInputBufferTypeToRGBA() {this->SetInputBufferType(VTK_RGBA);};
00128   void SetInputBufferTypeToZBuffer() {this->SetInputBufferType(VTK_ZBUFFER);};
00130 
00131 
00133   vtkImageData* GetOutput();
00134 
00136 
00137   virtual int ProcessRequest(vtkInformation*,
00138                              vtkInformationVector**,
00139                              vtkInformationVector*);
00141 
00142 protected:
00143   vtkWindowToImageFilter();
00144   ~vtkWindowToImageFilter();
00145 
00146   // vtkWindow is not a vtkDataObject, so we need our own ivar.
00147   vtkWindow *Input;
00148   int Magnification;
00149   int ReadFrontBuffer;
00150   int ShouldRerender;
00151   double Viewport[4];
00152   int InputBufferType;
00153 
00154   void RequestData(vtkInformation *, 
00155                    vtkInformationVector **, vtkInformationVector *);
00156 
00157   virtual void RequestInformation (vtkInformation*,
00158                                   vtkInformationVector**,
00159                                   vtkInformationVector*);
00160 
00161   // see algorithm for more info
00162   virtual int FillOutputPortInformation(int port, vtkInformation* info);
00163 
00164 private:
00165   vtkWindowToImageFilter(const vtkWindowToImageFilter&);  // Not implemented.
00166   void operator=(const vtkWindowToImageFilter&);  // Not implemented.
00167 };
00168 
00169 #endif

Generated on Mon Jan 21 23:07:37 2008 for VTK by  doxygen 1.4.3-20050530