VTK  9.2.6
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 
53 class vtkAbstractArray;
54 class vtkDataSet;
55 class vtkDoubleArray;
56 class vtkRenderWindow;
57 class vtkRenderer;
58 
59 class VTKIOIMPORT_EXPORT vtkImporter : public vtkObject
60 {
61 public:
62  vtkTypeMacro(vtkImporter, vtkObject);
63  void PrintSelf(ostream& os, vtkIndent indent) override;
64 
66 
70  vtkGetObjectMacro(Renderer, vtkRenderer);
72 
74 
82  virtual void SetRenderWindow(vtkRenderWindow*);
83  vtkGetObjectMacro(RenderWindow, vtkRenderWindow);
85 
87 
90  void Read();
91  void Update() { this->Read(); }
93 
98  virtual std::string GetOutputsDescription() { return ""; }
99 
104  virtual vtkIdType GetNumberOfAnimations();
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 
154 protected:
155  vtkImporter();
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*) {}
163  virtual void ImportProperties(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 
173 private:
174  vtkImporter(const vtkImporter&) = delete;
175  void operator=(const vtkImporter&) = delete;
176 };
177 
178 #endif
virtual void DisableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:117
abstract base class for most VTK objects
Definition: vtkObject.h:62
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
abstract class to specify dataset behavior
Definition: vtkDataSet.h:62
Abstract superclass for all arrays.
virtual void ImportCameras(vtkRenderer *)
Definition: vtkImporter.h:161
void Update()
Import the actors, cameras, lights and properties into a vtkRenderWindow.
Definition: vtkImporter.h:91
abstract specification for renderers
Definition: vtkRenderer.h:72
virtual std::string GetCameraName(vtkIdType vtkNotUsed(camIndex))
Get the name of a camera.
Definition: vtkImporter.h:131
int vtkIdType
Definition: vtkType.h:332
virtual void SetCamera(vtkIdType vtkNotUsed(camIndex))
Enable a specific camera.
Definition: vtkImporter.h:138
importer abstract class
Definition: vtkImporter.h:59
dynamic, self-adjusting array of double
virtual void ImportEnd()
Definition: vtkImporter.h:159
virtual int ImportBegin()
Definition: vtkImporter.h:158
virtual void EnableAnimation(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:116
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual std::string GetOutputsDescription()
Recover a printable string that let importer implementation Describe their outputs.
Definition: vtkImporter.h:98
virtual void ImportActors(vtkRenderer *)
Definition: vtkImporter.h:160
virtual vtkIdType GetNumberOfCameras()
Get the number of available cameras.
Definition: vtkImporter.h:125
virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex))
Get the name of an animation.
Definition: vtkImporter.h:110
virtual void ImportLights(vtkRenderer *)
Definition: vtkImporter.h:162
create a window for renderers to draw into
vtkRenderWindow * RenderWindow
Definition: vtkImporter.h:169
virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:118
vtkRenderer * Renderer
Definition: vtkImporter.h:168
virtual void ImportProperties(vtkRenderer *)
Definition: vtkImporter.h:163