VTK  9.2.6
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 =========================================================================*/
36 #ifndef vtkJSONRenderWindowExporter_h
37 #define vtkJSONRenderWindowExporter_h
38 
39 #include "vtkIOExportModule.h" // For export macro
40 
41 #include "vtkExporter.h"
42 #include "vtkNew.h" // For vtkNew
43 #include "vtkViewNodeFactory.h" // For vtkViewNodeFactory
44 
45 class vtkArchiver;
48 
49 class VTKIOEXPORT_EXPORT vtkJSONRenderWindowExporter : public vtkExporter
50 {
51 public:
54  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
57 
60  virtual void SetSerializer(vtkVtkJSSceneGraphSerializer*);
61  vtkGetObjectMacro(Serializer, vtkVtkJSSceneGraphSerializer);
63 
65 
68  virtual void SetArchiver(vtkArchiver*);
69  vtkGetObjectMacro(Archiver, vtkArchiver);
71 
73 
76  void WriteData() override;
78 
80 
83  vtkSetMacro(CompactOutput, bool);
84  vtkGetMacro(CompactOutput, bool);
85  vtkBooleanMacro(CompactOutput, bool);
87 
88 protected:
90  ~vtkJSONRenderWindowExporter() override;
91 
92 private:
94  void operator=(const vtkJSONRenderWindowExporter&) = delete;
95 
96  vtkArchiver* Archiver;
97  vtkVtkJSSceneGraphSerializer* Serializer;
98  vtkVtkJSViewNodeFactory* Factory;
99  bool CompactOutput;
100 };
101 
102 #endif
abstract class to write a scene to a file
Definition: vtkExporter.h:47
virtual void WriteData()=0
Constructs view nodes for traversing a scene for vtk-js.
a simple class to control print indentation
Definition: vtkIndent.h:39
Converts elements of a VTK scene graph into vtk-js elements.
Writes an archive.
Definition: vtkArchiver.h:39
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Exports a render window for vtk-js.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...