VTK  9.0.1
vtkJSONRenderWindowExporter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkJSONRenderWindowExporter.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 =========================================================================*/
33 #ifndef vtkJSONRenderWindowExporter_h
34 #define vtkJSONRenderWindowExporter_h
35 
36 #include "vtkIOExportModule.h" // For export macro
37 
38 #include "vtkExporter.h"
39 #include "vtkNew.h" // For vtkNew
40 #include "vtkViewNodeFactory.h" // For vtkViewNodeFactory
41 
42 class vtkArchiver;
45 
46 class VTKIOEXPORT_EXPORT vtkJSONRenderWindowExporter : public vtkExporter
47 {
48 public:
51  void PrintSelf(ostream& os, vtkIndent indent) override;
52 
54 
57  virtual void SetSerializer(vtkVtkJSSceneGraphSerializer*);
58  vtkGetObjectMacro(Serializer, vtkVtkJSSceneGraphSerializer);
60 
62 
65  virtual void SetArchiver(vtkArchiver*);
66  vtkGetObjectMacro(Archiver, vtkArchiver);
68 
70 
73  virtual void WriteData() override;
75 
77 
80  vtkSetMacro(CompactOutput, bool);
81  vtkGetMacro(CompactOutput, bool);
82  vtkBooleanMacro(CompactOutput, bool);
84 
85 protected:
87  ~vtkJSONRenderWindowExporter() override;
88 
89 private:
91  void operator=(const vtkJSONRenderWindowExporter&) = delete;
92 
93  vtkArchiver* Archiver;
94  vtkVtkJSSceneGraphSerializer* Serializer;
95  vtkVtkJSViewNodeFactory* Factory;
96  bool CompactOutput;
97 };
98 
99 #endif
vtkObject::New
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
vtkExporter::WriteData
virtual void WriteData()=0
vtkViewNodeFactory.h
vtkVtkJSViewNodeFactory
Constructs view nodes for traversing a scene for vtk-js.
Definition: vtkVtkJSViewNodeFactory.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkExporter::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkArchiver
Writes an archive.
Definition: vtkArchiver.h:36
vtkNew.h
vtkJSONRenderWindowExporter
Exports a render window for vtk-js.
Definition: vtkJSONRenderWindowExporter.h:46
vtkExporter
abstract class to write a scene to a file
Definition: vtkExporter.h:47
vtkExporter.h
vtkVtkJSSceneGraphSerializer
Converts elements of a VTK scene graph into vtk-js elements.
Definition: vtkVtkJSSceneGraphSerializer.h:68