VTK  9.4.20241218
vtkExporter.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
27#ifndef vtkExporter_h
28#define vtkExporter_h
29
30#include "vtkIOExportModule.h" // For export macro
31#include "vtkObject.h"
32VTK_ABI_NAMESPACE_BEGIN
33class vtkRenderWindow;
34class vtkRenderer;
35
36class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
37{
38public:
39 vtkTypeMacro(vtkExporter, vtkObject);
40 void PrintSelf(ostream& os, vtkIndent indent) override;
41
47 virtual void Write();
48
53 void Update();
54
56
60 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
62
64
75 vtkGetObjectMacro(ActiveRenderer, vtkRenderer);
77
79
83 void SetInput(vtkRenderWindow* renWin) { this->SetRenderWindow(renWin); }
84 vtkRenderWindow* GetInput() { return this->GetRenderWindow(); }
86
91 void SetStartWrite(void (*f)(void*), void* arg);
92
97 void SetEndWrite(void (*f)(void*), void* arg);
98
102 void SetStartWriteArgDelete(void (*f)(void*));
103
107 void SetEndWriteArgDelete(void (*f)(void*));
108
113
114protected:
116 ~vtkExporter() override;
117
120 virtual void WriteData() = 0;
121
122 void (*StartWrite)(void*);
123 void (*StartWriteArgDelete)(void*);
125 void (*EndWrite)(void*);
126 void (*EndWriteArgDelete)(void*);
128
129private:
130 vtkExporter(const vtkExporter&) = delete;
131 void operator=(const vtkExporter&) = delete;
132};
133
134VTK_ABI_NAMESPACE_END
135#endif
abstract class to write a scene to a file
Definition vtkExporter.h:37
~vtkExporter() override
vtkMTimeType GetMTime() override
Returns the MTime also considering the RenderWindow.
void * EndWriteArg
vtkRenderWindow * RenderWindow
virtual VTK_UNBLOCKTHREADS void Write()
Write data to output.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void WriteData()=0
void SetInput(vtkRenderWindow *renWin)
These methods are provided for backward compatibility.
Definition vtkExporter.h:83
void SetEndWrite(void(*f)(void *), void *arg)
Specify a function to be called after data is written.
void * StartWriteArg
void SetStartWrite(void(*f)(void *), void *arg)
Specify a function to be called before data is written.
vtkRenderer * ActiveRenderer
void SetStartWriteArgDelete(void(*f)(void *))
Set the arg delete method.
void SetEndWriteArgDelete(void(*f)(void *))
Set the arg delete method.
vtkRenderWindow * GetInput()
These methods are provided for backward compatibility.
Definition vtkExporter.h:84
virtual void SetRenderWindow(vtkRenderWindow *)
Set/Get the rendering window that contains the scene to be written.
VTK_UNBLOCKTHREADS void Update()
Convenient alias for Write() method.
virtual void SetActiveRenderer(vtkRenderer *)
Set/Get the renderer that contains actors to be written.
a simple class to control print indentation
Definition vtkIndent.h:108
abstract base class for most VTK objects
Definition vtkObject.h:162
create a window for renderers to draw into
abstract specification for renderers
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:270
#define VTK_UNBLOCKTHREADS