VTK  9.7.20260910
vtkResizingWindowToImageFilter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
41
42#ifndef vtkResizingWindowToImageFilter_h
43#define vtkResizingWindowToImageFilter_h
44
45#include "vtkAlgorithm.h"
46#include "vtkImageData.h" // makes things a bit easier
47#include "vtkRenderingCoreModule.h" // For export macro
48#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
49
50// VTK_RGB and VTK_RGBA are defined in system includes
51#define VTK_ZBUFFER 5
52
53VTK_ABI_NAMESPACE_BEGIN
54class vtkWindow;
55
56class vtkWTI2DHelperClass;
57class VTKRENDERINGCORE_EXPORT VTK_MARSHALAUTO vtkResizingWindowToImageFilter : public vtkAlgorithm
58{
59public:
61
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
68 void SetInput(vtkWindow* input);
69
71
75 vtkGetObjectMacro(Input, vtkWindow);
77
79
82 vtkGetVector2Macro(Size, int);
83 vtkSetVector2Macro(Size, int);
85
87
92 vtkGetMacro(SizeLimit, int);
93 vtkSetMacro(SizeLimit, int);
95
97
103 vtkSetMacro(InputBufferType, int);
104 vtkGetMacro(InputBufferType, int);
109
114
120
121protected:
124
125 // vtkWindow is not a vtkDataObject, so we need our own ivar.
127 // requested size of the screenshot in pixels.
128 int Size[2];
129 // window size limit for using this filter. If the target resolution is higher we switch to
130 // vtkWindowToImageFilter with tiling
132
134
136
138
139 // see algorithm for more info
140 int FillOutputPortInformation(int port, vtkInformation* info) override;
141
149 virtual void Render();
150
166 const int requestedSize[2], int actualSize[2], int scale[2], bool* approximate);
167
168private:
170 void operator=(const vtkResizingWindowToImageFilter&) = delete;
171};
172
173VTK_ABI_NAMESPACE_END
174#endif
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void SetInputBufferType(int)
Set/get the window buffer from which data will be read.
void SetInput(vtkWindow *input)
Indicates what renderer to get the pixel data from.
void GetScaleFactorsAndSize(const int requestedSize[2], int actualSize[2], int scale[2], bool *approximate)
Compute scale factors and new size for target resolution.
virtual void Render()
Allows subclasses to customize how a request for render is handled.
void RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageData * GetOutput()
Get the output data object for a port on this algorithm.
void SetInputBufferTypeToZBuffer()
Set/get the window buffer from which data will be read.
void SetInputBufferTypeToRGB()
Set/get the window buffer from which data will be read.
virtual void RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
~vtkResizingWindowToImageFilter() override
static vtkResizingWindowToImageFilter * New()
vtkTypeBool ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
see vtkAlgorithm for details
int FillOutputPortInformation(int port, vtkInformation *info) override
Fill the output port information objects for this algorithm.
void SetInputBufferTypeToRGBA()
Set/get the window buffer from which data will be read.
window superclass for vtkRenderWindow
Definition vtkWindow.h:62
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_RGBA
#define VTK_RGB
#define VTK_MARSHALAUTO