00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00062 #ifndef __vtkWindowToImageFilter_h
00063 #define __vtkWindowToImageFilter_h
00064
00065 #include "vtkAlgorithm.h"
00066 #include "vtkImageData.h"
00067
00068
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
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
00162 virtual int FillOutputPortInformation(int port, vtkInformation* info);
00163
00164 private:
00165 vtkWindowToImageFilter(const vtkWindowToImageFilter&);
00166 void operator=(const vtkWindowToImageFilter&);
00167 };
00168
00169 #endif