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 vtkWTI2DHelperClass;
00074 class VTK_RENDERING_EXPORT vtkWindowToImageFilter : public vtkAlgorithm
00075 {
00076 public:
00077 static vtkWindowToImageFilter *New();
00078
00079 vtkTypeMacro(vtkWindowToImageFilter,vtkAlgorithm);
00080 void PrintSelf(ostream& os, vtkIndent indent);
00081
00084 void SetInput(vtkWindow *input);
00085
00087
00089 vtkGetObjectMacro(Input,vtkWindow);
00091
00093
00094 vtkSetClampMacro(Magnification,int,1,2048);
00095 vtkGetMacro(Magnification,int);
00097
00099
00101 vtkBooleanMacro(ReadFrontBuffer, int);
00102 vtkGetMacro(ReadFrontBuffer, int);
00103 vtkSetMacro(ReadFrontBuffer, int);
00105
00107
00109 vtkBooleanMacro(ShouldRerender, int);
00110 vtkSetMacro(ShouldRerender, int);
00111 vtkGetMacro(ShouldRerender, int);
00113
00115
00117 vtkSetVector4Macro(Viewport,double);
00118 vtkGetVectorMacro(Viewport,double,4);
00120
00122
00126 vtkSetMacro(InputBufferType, int);
00127 vtkGetMacro(InputBufferType, int);
00128 void SetInputBufferTypeToRGB() {this->SetInputBufferType(VTK_RGB);};
00129 void SetInputBufferTypeToRGBA() {this->SetInputBufferType(VTK_RGBA);};
00130 void SetInputBufferTypeToZBuffer() {this->SetInputBufferType(VTK_ZBUFFER);};
00132
00133
00135 vtkImageData* GetOutput();
00136
00138
00139 virtual int ProcessRequest(vtkInformation*,
00140 vtkInformationVector**,
00141 vtkInformationVector*);
00143
00144 protected:
00145 vtkWindowToImageFilter();
00146 ~vtkWindowToImageFilter();
00147
00148
00149 vtkWindow *Input;
00150 int Magnification;
00151 int ReadFrontBuffer;
00152 int ShouldRerender;
00153 double Viewport[4];
00154 int InputBufferType;
00155
00156 void RequestData(vtkInformation *,
00157 vtkInformationVector **, vtkInformationVector *);
00158
00159 virtual void RequestInformation (vtkInformation*,
00160 vtkInformationVector**,
00161 vtkInformationVector*);
00162
00163
00164 virtual int FillOutputPortInformation(int port, vtkInformation* info);
00165
00166
00167 void Rescale2DActors();
00168 void Shift2DActors(int x, int y);
00169 void Restore2DActors();
00170 vtkWTI2DHelperClass *StoredData;
00171
00172 private:
00173 vtkWindowToImageFilter(const vtkWindowToImageFilter&);
00174 void operator=(const vtkWindowToImageFilter&);
00175 };
00176
00177 #endif