VTK  9.7.20260926
vtkScivisExporter.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
3
39
40#ifndef vtkScivisExporter_h
41#define vtkScivisExporter_h
42
43#include "vtkObject.h"
44#include "vtkSmartPointer.h" // For the returned image
45#include "vtkViewsScivisModule.h" // For export macro
46#include "vtkWeakPointer.h" // For ivar
47
48VTK_ABI_NAMESPACE_BEGIN
49class vtkImageData;
50class vtkScivisView;
51
52class VTKVIEWSSCIVIS_EXPORT vtkScivisExporter : public vtkObject
53{
54public:
57 void PrintSelf(ostream& os, vtkIndent indent) override;
58
60
64 vtkSetClampMacro(Magnification, int, 1, VTK_INT_MAX);
65 vtkGetMacro(Magnification, int);
67
69
77 vtkSetMacro(TransparentBackground, bool);
78 vtkGetMacro(TransparentBackground, bool);
79 vtkBooleanMacro(TransparentBackground, bool);
81
86 bool SaveScreenshot(const char* filename);
87
93
101 bool ExportScene(const char* filename);
102
103protected:
106
107private:
108 friend class vtkScivisView;
109
110 // The view this exports, held weakly: the exporter is reached through the
111 // view, but Python can outlive it -- `e = view.exporter; del view` -- and an
112 // exporter with nothing to export should say so rather than crash.
113 void SetView(vtkScivisView* view);
115
116 vtkScivisExporter(const vtkScivisExporter&) = delete;
117 void operator=(const vtkScivisExporter&) = delete;
118
119 int Magnification;
120 bool TransparentBackground;
121};
122
123VTK_ABI_NAMESPACE_END
124#endif
topologically and geometrically regular array of data
a simple class to control print indentation
Definition vtkIndent.h:108
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSmartPointer< vtkImageData > CaptureImage()
The same picture, handed back rather than written.
bool SaveScreenshot(const char *filename)
Write a picture of the scene, as .png, .jpg, .tif or .bmp.
bool ExportScene(const char *filename)
Write the geometry in the scene, as .gltf, .obj, .vrml/.wrl or .x3d.
friend class vtkScivisView
~vtkScivisExporter() override
static vtkScivisExporter * New()
A ready-made rendering assembly for scientific visualization.
Hold a reference to a vtkObjectBase instance.
a weak reference to a vtkObject.
#define VTK_INT_MAX
Definition vtkType.h:192