VTK  9.1.0
vtkExporter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkExporter.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=========================================================================*/
39#ifndef vtkExporter_h
40#define vtkExporter_h
41
42#include "vtkIOExportModule.h" // For export macro
43#include "vtkObject.h"
44class vtkRenderWindow;
45class vtkRenderer;
46
47class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
48{
49public:
50 vtkTypeMacro(vtkExporter, vtkObject);
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
57 virtual void Write();
58
62 void Update();
63
65
69 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
71
73
84 vtkGetObjectMacro(ActiveRenderer, vtkRenderer);
86
88
92 void SetInput(vtkRenderWindow* renWin) { this->SetRenderWindow(renWin); }
93 vtkRenderWindow* GetInput() { return this->GetRenderWindow(); }
95
100 void SetStartWrite(void (*f)(void*), void* arg);
101
106 void SetEndWrite(void (*f)(void*), void* arg);
107
111 void SetStartWriteArgDelete(void (*f)(void*));
112
116 void SetEndWriteArgDelete(void (*f)(void*));
117
122
123protected:
125 ~vtkExporter() override;
126
129 virtual void WriteData() = 0;
130
131 void (*StartWrite)(void*);
132 void (*StartWriteArgDelete)(void*);
134 void (*EndWrite)(void*);
135 void (*EndWriteArgDelete)(void*);
137
138private:
139 vtkExporter(const vtkExporter&) = delete;
140 void operator=(const vtkExporter&) = delete;
141};
142
143#endif
abstract class to write a scene to a file
Definition: vtkExporter.h:48
virtual void Write()
Write data to output.
~vtkExporter() override
vtkMTimeType GetMTime() override
Returns the MTime also considering the RenderWindow.
void * EndWriteArg
Definition: vtkExporter.h:136
vtkRenderWindow * RenderWindow
Definition: vtkExporter.h:127
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:92
void SetEndWrite(void(*f)(void *), void *arg)
Specify a function to be called after data is written.
void * StartWriteArg
Definition: vtkExporter.h:133
void SetStartWrite(void(*f)(void *), void *arg)
Specify a function to be called before data is written.
vtkRenderer * ActiveRenderer
Definition: vtkExporter.h:128
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:93
virtual void SetRenderWindow(vtkRenderWindow *)
Set/Get the rendering window that contains the scene to be written.
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:113
abstract base class for most VTK objects
Definition: vtkObject.h:73
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:173
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287