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 =========================================================================*/
62 #ifndef vtkWindowToImageFilter_h
63 #define vtkWindowToImageFilter_h
64 
65 #include "vtkRenderingCoreModule.h" // For export macro
66 #include "vtkAlgorithm.h"
67 #include "vtkImageData.h" // makes things a bit easier
68 
69 // VTK_RGB and VTK_RGBA are defined in system includes
70 #define VTK_ZBUFFER 5
71 
72 class vtkWindow;
73 
74 class vtkWTI2DHelperClass;
76 {
77 public:
79 
81  void PrintSelf(ostream& os, vtkIndent indent);
82 
86 
88 
92 
94 
95  vtkSetClampMacro(Magnification,int,1,2048);
96  vtkGetMacro(Magnification,int);
98 
100 
103  vtkSetMacro(FixBoundary, bool);
104  vtkGetMacro(FixBoundary, bool);
105  vtkBooleanMacro(FixBoundary, bool);
107 
109 
111  vtkBooleanMacro(ReadFrontBuffer, int);
112  vtkGetMacro(ReadFrontBuffer, int);
113  vtkSetMacro(ReadFrontBuffer, int);
115 
117 
119  vtkBooleanMacro(ShouldRerender, int);
120  vtkSetMacro(ShouldRerender, int);
121  vtkGetMacro(ShouldRerender, int);
123 
125 
127  vtkSetVector4Macro(Viewport,double);
128  vtkGetVectorMacro(Viewport,double,4);
130 
132 
136  vtkSetMacro(InputBufferType, int);
137  vtkGetMacro(InputBufferType, int);
138  void SetInputBufferTypeToRGB() {this->SetInputBufferType(VTK_RGB);};
139  void SetInputBufferTypeToRGBA() {this->SetInputBufferType(VTK_RGBA);};
140  void SetInputBufferTypeToZBuffer() {this->SetInputBufferType(VTK_ZBUFFER);};
142 
143 
146 
148 
153 
154 protected:
157 
158  // vtkWindow is not a vtkDataObject, so we need our own ivar.
163  double Viewport[4];
166 
169 
173 
174  // see algorithm for more info
176 
177  // The following was extracted from vtkRenderLargeImage, and patch to handle viewports
179  void Shift2DActors(int x, int y);
181  vtkWTI2DHelperClass *StoredData;
182 
183 private:
184  vtkWindowToImageFilter(const vtkWindowToImageFilter&); // Not implemented.
185  void operator=(const vtkWindowToImageFilter&); // Not implemented.
186 };
187 
188 #endif
vtkWindowToImageFilter::RequestInformation
virtual void RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageData.h
vtkWindowToImageFilter::SetInputBufferTypeToZBuffer
void SetInputBufferTypeToZBuffer()
Definition: vtkWindowToImageFilter.h:140
vtkGetObjectMacro
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:232
vtkWindowToImageFilter::GetOutput
vtkImageData * GetOutput()
vtkWindowToImageFilter::~vtkWindowToImageFilter
~vtkWindowToImageFilter()
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
vtkWindowToImageFilter::SetInputBufferTypeToRGBA
void SetInputBufferTypeToRGBA()
Definition: vtkWindowToImageFilter.h:139
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkWindowToImageFilter::FixBoundary
bool FixBoundary
Definition: vtkWindowToImageFilter.h:165
vtkWindowToImageFilter::ReadFrontBuffer
int ReadFrontBuffer
Definition: vtkWindowToImageFilter.h:161
vtkWindowToImageFilter
Use a vtkWindow as input to image pipeline.
Definition: vtkWindowToImageFilter.h:76
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkWindowToImageFilter::ProcessRequest
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkWindowToImageFilter::SetInput
void SetInput(vtkWindow *input)
vtkWindowToImageFilter::Input
vtkWindow * Input
Definition: vtkWindowToImageFilter.h:159
vtkgl::x
GLint GLint GLint GLint GLint x
Definition: vtkgl.h:11318
vtkWindowToImageFilter::Shift2DActors
void Shift2DActors(int x, int y)
vtkgl::input
GLenum GLenum GLenum input
Definition: vtkgl.h:15941
vtkGetVectorMacro
#define vtkGetVectorMacro(name, type, count)
Definition: vtkSetGet.h:424
vtkWindowToImageFilter::Rescale2DActors
void Rescale2DActors()
vtkWindowToImageFilter::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkWindow
window superclass for vtkRenderWindow
Definition: vtkWindow.h:34
vtkAlgorithm.h
vtkX3D::port
@ port
Definition: vtkX3D.h:447
vtkSetClampMacro
#define vtkSetClampMacro(name, type, min, max)
Definition: vtkSetGet.h:143
vtkWindowToImageFilter::ShouldRerender
int ShouldRerender
Definition: vtkWindowToImageFilter.h:162
VTK_ZBUFFER
#define VTK_ZBUFFER
Definition: vtkWindowToImageFilter.h:70
VTK_RGB
#define VTK_RGB
Definition: vtkSystemIncludes.h:95
vtkWindowToImageFilter::RequestData
void RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderingCoreModule.h
vtkWindowToImageFilter::Restore2DActors
void Restore2DActors()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkWindowToImageFilter::vtkWindowToImageFilter
vtkWindowToImageFilter()
vtkWindowToImageFilter::InputBufferType
int InputBufferType
Definition: vtkWindowToImageFilter.h:164
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkX3D::info
@ info
Definition: vtkX3D.h:376
vtkSetVector4Macro
#define vtkSetVector4Macro(name, type)
Definition: vtkSetGet.h:322
vtkgl::y
GLint GLint GLint GLint GLint GLint y
Definition: vtkgl.h:11318
VTK_RGBA
#define VTK_RGBA
Definition: vtkSystemIncludes.h:96
VTKRENDERINGCORE_EXPORT
#define VTKRENDERINGCORE_EXPORT
Definition: vtkRenderingCoreModule.h:15
vtkWindowToImageFilter::StoredData
vtkWTI2DHelperClass * StoredData
Definition: vtkWindowToImageFilter.h:181
vtkWindowToImageFilter::New
static vtkWindowToImageFilter * New()
vtkWindowToImageFilter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkWindowToImageFilter::SetInputBufferTypeToRGB
void SetInputBufferTypeToRGB()
Definition: vtkWindowToImageFilter.h:138
vtkWindowToImageFilter::Magnification
int Magnification
Definition: vtkWindowToImageFilter.h:160