VTK  9.1.0
vtkImporter.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkImporter.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=========================================================================*/
45#ifndef vtkImporter_h
46#define vtkImporter_h
47
48#include "vtkIOImportModule.h" // For export macro
49#include "vtkObject.h"
50
51#include <string> // for std::string
52
54class vtkDataSet;
55class vtkDoubleArray;
56class vtkRenderWindow;
57class vtkRenderer;
58
59class VTKIOIMPORT_EXPORT vtkImporter : public vtkObject
60{
61public:
62 vtkTypeMacro(vtkImporter, vtkObject);
63 void PrintSelf(ostream& os, vtkIndent indent) override;
64
66
70 vtkGetObjectMacro(Renderer, vtkRenderer);
72
74
83 vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
85
87
90 void Read();
91 void Update() { this->Read(); }
93
98 virtual std::string GetOutputsDescription() { return ""; }
99
105
110 virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex)) { return ""; }
111
113
116 virtual void EnableAnimation(vtkIdType vtkNotUsed(animationIndex)) {}
117 virtual void DisableAnimation(vtkIdType vtkNotUsed(animationIndex)) {}
118 virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex)) { return false; }
120
125 virtual vtkIdType GetNumberOfCameras() { return 0; }
126
131 virtual std::string GetCameraName(vtkIdType vtkNotUsed(camIndex)) { return ""; }
132
138 virtual void SetCamera(vtkIdType vtkNotUsed(camIndex)) {}
139
145 virtual bool GetTemporalInformation(vtkIdType animationIndex, double frameRate, int& nbTimeSteps,
146 double timeRange[2], vtkDoubleArray* timeSteps);
147
152 virtual void UpdateTimeStep(double timeStep);
153
154protected:
156 ~vtkImporter() override;
157
158 virtual int ImportBegin() { return 1; }
159 virtual void ImportEnd() {}
160 virtual void ImportActors(vtkRenderer*) {}
161 virtual void ImportCameras(vtkRenderer*) {}
162 virtual void ImportLights(vtkRenderer*) {}
164
165 static std::string GetDataSetDescription(vtkDataSet* ds, vtkIndent indent);
166 static std::string GetArrayDescription(vtkAbstractArray* array, vtkIndent indent);
167
170
171 virtual void ReadData();
172
173private:
174 vtkImporter(const vtkImporter&) = delete;
175 void operator=(const vtkImporter&) = delete;
176};
177
178#endif
Abstract superclass for all arrays.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:166
dynamic, self-adjusting array of double
importer abstract class
Definition: vtkImporter.h:60
virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:118
virtual void ImportProperties(vtkRenderer *)
Definition: vtkImporter.h:163
virtual void ReadData()
void Update()
Import the actors, cameras, lights and properties into a vtkRenderWindow.
Definition: vtkImporter.h:91
virtual void SetCamera(vtkIdType vtkNotUsed(camIndex))
Enable a specific camera.
Definition: vtkImporter.h:138
vtkRenderWindow * RenderWindow
Definition: vtkImporter.h:169
virtual void DisableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:117
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition: vtkImporter.h:98
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void ImportCameras(vtkRenderer *)
Definition: vtkImporter.h:161
virtual bool GetTemporalInformation(vtkIdType animationIndex, double frameRate, int &nbTimeSteps, double timeRange[2], vtkDoubleArray *timeSteps)
Get temporal informations for the currently enabled animations.
virtual void ImportActors(vtkRenderer *)
Definition: vtkImporter.h:160
virtual std::string GetCameraName(vtkIdType vtkNotUsed(camIndex))
Get the name of a camera.
Definition: vtkImporter.h:131
virtual void EnableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:116
virtual void UpdateTimeStep(double timeStep)
Import the actors, camera, lights and properties at a specific timestep.
virtual int ImportBegin()
Definition: vtkImporter.h:158
static std::string GetDataSetDescription(vtkDataSet *ds, vtkIndent indent)
static std::string GetArrayDescription(vtkAbstractArray *array, vtkIndent indent)
vtkRenderer * Renderer
Definition: vtkImporter.h:168
virtual void ImportEnd()
Definition: vtkImporter.h:159
~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.
Definition: vtkImporter.h:125
virtual void ImportLights(vtkRenderer *)
Definition: vtkImporter.h:162
virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex))
Get the name of an animation.
Definition: vtkImporter.h:110
a simple class to control print indentation
Definition: vtkIndent.h:113
abstract base class for most VTK objects
Definition: vtkObject.h:82
create a window for renderers to draw into
abstract specification for renderers
Definition: vtkRenderer.h:182
int vtkIdType
Definition: vtkType.h:332