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