VTK  9.3.0
vtkImporter.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
33#ifndef vtkImporter_h
34#define vtkImporter_h
35
36#include "vtkIOImportModule.h" // For export macro
37#include "vtkObject.h"
38
39#include <string> // for std::string
40
41VTK_ABI_NAMESPACE_BEGIN
43class vtkDataSet;
44class vtkDoubleArray;
45class vtkRenderWindow;
46class vtkRenderer;
47
48class VTKIOIMPORT_EXPORT vtkImporter : public vtkObject
49{
50public:
51 vtkTypeMacro(vtkImporter, vtkObject);
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
55
59 vtkGetObjectMacro(Renderer, vtkRenderer);
61
63
72 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
74
76
79 void Read();
80 void Update() { this->Read(); }
82
87 virtual std::string GetOutputsDescription() { return ""; }
88
94
99 virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex)) { return ""; }
100
102
105 virtual void EnableAnimation(vtkIdType vtkNotUsed(animationIndex)) {}
106 virtual void DisableAnimation(vtkIdType vtkNotUsed(animationIndex)) {}
107 virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex)) { return false; }
109
114 virtual vtkIdType GetNumberOfCameras() { return 0; }
115
120 virtual std::string GetCameraName(vtkIdType vtkNotUsed(camIndex)) { return ""; }
121
127 virtual void SetCamera(vtkIdType vtkNotUsed(camIndex)) {}
128
139 virtual bool GetTemporalInformation(vtkIdType animationIndex, double frameRate, int& nbTimeSteps,
140 double timeRange[2], vtkDoubleArray* timeSteps);
141
146 virtual void UpdateTimeStep(double timeValue);
147
148protected:
150 ~vtkImporter() override;
151
152 virtual int ImportBegin() { return 1; }
153 virtual void ImportEnd() {}
154 virtual void ImportActors(vtkRenderer*) {}
155 virtual void ImportCameras(vtkRenderer*) {}
156 virtual void ImportLights(vtkRenderer*) {}
158
159 static std::string GetDataSetDescription(vtkDataSet* ds, vtkIndent indent);
160 static std::string GetArrayDescription(vtkAbstractArray* array, vtkIndent indent);
161
164
165 virtual void ReadData();
166
167private:
168 vtkImporter(const vtkImporter&) = delete;
169 void operator=(const vtkImporter&) = delete;
170};
171
172VTK_ABI_NAMESPACE_END
173#endif
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition vtkDataSet.h:53
dynamic, self-adjusting array of double
importer abstract class
Definition vtkImporter.h:49
virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
virtual void ImportProperties(vtkRenderer *)
virtual void ReadData()
void Update()
Import the actors, cameras, lights and properties into a vtkRenderWindow.
Definition vtkImporter.h:80
virtual void SetCamera(vtkIdType vtkNotUsed(camIndex))
Enable a specific camera.
virtual void UpdateTimeStep(double timeValue)
Import the actors, camera, lights and properties at a specific time value.
vtkRenderWindow * RenderWindow
virtual void DisableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition vtkImporter.h:87
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ImportCameras(vtkRenderer *)
virtual bool GetTemporalInformation(vtkIdType animationIndex, double frameRate, int &nbTimeSteps, double timeRange[2], vtkDoubleArray *timeSteps)
Get temporal information for the provided animationIndex and frameRate.
virtual void ImportActors(vtkRenderer *)
virtual std::string GetCameraName(vtkIdType vtkNotUsed(camIndex))
Get the name of a camera.
virtual void EnableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
virtual int ImportBegin()
static std::string GetDataSetDescription(vtkDataSet *ds, vtkIndent indent)
static std::string GetArrayDescription(vtkAbstractArray *array, vtkIndent indent)
vtkRenderer * Renderer
virtual void ImportEnd()
~vtkImporter() override
virtual vtkIdType GetNumberOfAnimations()
Get the number of available animations.
virtual void SetRenderWindow(vtkRenderWindow *)
Set the vtkRenderWindow to contain the imported actors, cameras and lights, If no vtkRenderWindow is ...
void Read()
Import the actors, cameras, lights and properties into a vtkRenderWindow.
virtual vtkIdType GetNumberOfCameras()
Get the number of available cameras.
virtual void ImportLights(vtkRenderer *)
virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex))
Get the name of an animation.
Definition vtkImporter.h:99
a simple class to control print indentation
Definition vtkIndent.h:29
abstract base class for most VTK objects
Definition vtkObject.h:49
create a window for renderers to draw into
abstract specification for renderers
Definition vtkRenderer.h:59
int vtkIdType
Definition vtkType.h:315