VTK
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;
45
46class VTKIOEXPORT_EXPORT vtkExporter : public vtkObject
47{
48public:
49 vtkTypeMacro(vtkExporter,vtkObject);
50 void PrintSelf(ostream& os, vtkIndent indent);
51
56 virtual void Write();
57
61 void Update();
62
64
68 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
70
72
76 void SetInput(vtkRenderWindow *renWin) {this->SetRenderWindow(renWin);};
79
84 void SetStartWrite(void (*f)(void *), void *arg);
85
90 void SetEndWrite(void (*f)(void *), void *arg);
91
95 void SetStartWriteArgDelete(void (*f)(void *));
96
100 void SetEndWriteArgDelete(void (*f)(void *));
101
106
107protected:
110
112 virtual void WriteData() = 0;
113
114 void (*StartWrite)(void *);
115 void (*StartWriteArgDelete)(void *);
117 void (*EndWrite)(void *);
118 void (*EndWriteArgDelete)(void *);
120private:
121 vtkExporter(const vtkExporter&) VTK_DELETE_FUNCTION;
122 void operator=(const vtkExporter&) VTK_DELETE_FUNCTION;
123};
124
125#endif
126
127
abstract class to write a scene to a file
Definition: vtkExporter.h:47
virtual void Write()
Write data to output.
vtkMTimeType GetMTime()
Returns the MTime also considering the RenderWindow.
void * EndWriteArg
Definition: vtkExporter.h:119
vtkRenderWindow * RenderWindow
Definition: vtkExporter.h:111
virtual void WriteData()=0
void SetInput(vtkRenderWindow *renWin)
These methods are provided for backward compatibility.
Definition: vtkExporter.h:76
void SetEndWrite(void(*f)(void *), void *arg)
Specify a function to be called after data is written.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
void * StartWriteArg
Definition: vtkExporter.h:116
void SetStartWrite(void(*f)(void *), void *arg)
Specify a function to be called before data is written.
void SetStartWriteArgDelete(void(*f)(void *))
Set the arg delete method.
void SetEndWriteArgDelete(void(*f)(void *))
Set the arg delete method.
vtkRenderWindow * GetInput()
Definition: vtkExporter.h:77
virtual void SetRenderWindow(vtkRenderWindow *)
Set/Get the rendering window that contains the scene to be written.
void Update()
Convenient alias for Write() method.
a simple class to control print indentation
Definition: vtkIndent.h:40
abstract base class for most VTK objects
Definition: vtkObject.h:60
create a window for renderers to draw into
vtkRenderWindow * GetRenderWindow()
Updates the extensions string.
virtual void SetRenderWindow(vtkRenderWindow *renwin)
Updates the extensions string.
vtkTypeUInt64 vtkMTimeType
Definition: vtkType.h:248