VTK
vtkWindowToImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkWindowToImageFilter.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
64#ifndef vtkWindowToImageFilter_h
65#define vtkWindowToImageFilter_h
66
67#include "vtkRenderingCoreModule.h" // For export macro
68#include "vtkAlgorithm.h"
69#include "vtkImageData.h" // makes things a bit easier
70
71// VTK_RGB and VTK_RGBA are defined in system includes
72#define VTK_ZBUFFER 5
73
74class vtkWindow;
75
76class vtkWTI2DHelperClass;
77class VTKRENDERINGCORE_EXPORT vtkWindowToImageFilter : public vtkAlgorithm
78{
79public:
81
83 void PrintSelf(ostream& os, vtkIndent indent);
84
88 void SetInput(vtkWindow *input);
89
91
95 vtkGetObjectMacro(Input,vtkWindow);
97
99
102 vtkSetClampMacro(Magnification,int,1,2048);
103 vtkGetMacro(Magnification,int);
105
107
112 vtkSetMacro(FixBoundary, bool);
113 vtkGetMacro(FixBoundary, bool);
114 vtkBooleanMacro(FixBoundary, bool);
116
118
122 vtkBooleanMacro(ReadFrontBuffer, int);
123 vtkGetMacro(ReadFrontBuffer, int);
124 vtkSetMacro(ReadFrontBuffer, int);
126
128
132 vtkBooleanMacro(ShouldRerender, int);
133 vtkSetMacro(ShouldRerender, int);
134 vtkGetMacro(ShouldRerender, int);
136
138
142 void SetViewport(double, double, double, double);
143 void SetViewport(double*);
144 vtkGetVectorMacro(Viewport,double,4);
146
148
154 vtkSetMacro(InputBufferType, int);
155 vtkGetMacro(InputBufferType, int);
156 void SetInputBufferTypeToRGB() {this->SetInputBufferType(VTK_RGB);};
157 void SetInputBufferTypeToRGBA() {this->SetInputBufferType(VTK_RGBA);};
158 void SetInputBufferTypeToZBuffer() {this->SetInputBufferType(VTK_ZBUFFER);};
160
161
166
173
174protected:
177
178 // vtkWindow is not a vtkDataObject, so we need our own ivar.
183 double Viewport[4];
186
189
193
194 // see algorithm for more info
196
197 // The following was extracted from vtkRenderLargeImage, and patch to handle viewports
199 void Shift2DActors(int x, int y);
201 vtkWTI2DHelperClass *StoredData;
202
203private:
204 vtkWindowToImageFilter(const vtkWindowToImageFilter&) VTK_DELETE_FUNCTION;
205 void operator=(const vtkWindowToImageFilter&) VTK_DELETE_FUNCTION;
206};
207
208#endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
Use a vtkWindow as input to image pipeline.
void SetViewport(double *)
void SetInput(vtkWindow *input)
Indicates what renderer to get the pixel data from.
void SetViewport(double, double, double, double)
Set/get the extents to be used to generate the image.
vtkImageData * GetOutput()
Get the output data object for a port on this algorithm.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
see vtkAlgorithm for details
vtkWTI2DHelperClass * StoredData
void Shift2DActors(int x, int y)
void RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual void RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
static vtkWindowToImageFilter * New()
window superclass for vtkRenderWindow
Definition: vtkWindow.h:35
@ info
Definition: vtkX3D.h:376
@ port
Definition: vtkX3D.h:447
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
#define VTK_RGBA
#define VTK_RGB
#define VTK_ZBUFFER