VTK  9.0.1
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>
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 
126  virtual bool GetTemporalInformation(
127  vtkIdType animationIndex, int& nbTimeSteps, double timeRange[2], vtkDoubleArray* timeSteps);
128 
133  virtual void UpdateTimeStep(double timeStep);
134 
135 protected:
136  vtkImporter();
137  ~vtkImporter() override;
138 
139  virtual int ImportBegin() { return 1; }
140  virtual void ImportEnd() {}
141  virtual void ImportActors(vtkRenderer*) {}
142  virtual void ImportCameras(vtkRenderer*) {}
143  virtual void ImportLights(vtkRenderer*) {}
144  virtual void ImportProperties(vtkRenderer*) {}
145 
146  static std::string GetDataSetDescription(vtkDataSet* ds, vtkIndent indent);
147  static std::string GetArrayDescription(vtkAbstractArray* array, vtkIndent indent);
148 
151 
152  virtual void ReadData();
153 
154 private:
155  vtkImporter(const vtkImporter&) = delete;
156  void operator=(const vtkImporter&) = delete;
157 };
158 
159 #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:56
Abstract superclass for all arrays.
virtual void ImportCameras(vtkRenderer *)
Definition: vtkImporter.h:142
void Update()
Import the actors, cameras, lights and properties into a vtkRenderWindow.
Definition: vtkImporter.h:91
abstract specification for renderers
Definition: vtkRenderer.h:67
int vtkIdType
Definition: vtkType.h:338
importer abstract class
Definition: vtkImporter.h:59
dynamic, self-adjusting array of double
virtual void ImportEnd()
Definition: vtkImporter.h:140
virtual int ImportBegin()
Definition: vtkImporter.h:139
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:33
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:141
virtual std::string GetAnimationName(vtkIdType vtkNotUsed(animationIndex))
Get the name of an animation.
Definition: vtkImporter.h:110
virtual void ImportLights(vtkRenderer *)
Definition: vtkImporter.h:143
create a window for renderers to draw into
vtkRenderWindow * RenderWindow
Definition: vtkImporter.h:150
virtual bool IsAnimationEnabled(vtkIdType vtkNotUsed(animationIndex))
Enable/Disable/Get the status of specific animations.
Definition: vtkImporter.h:118
vtkRenderer * Renderer
Definition: vtkImporter.h:149
virtual void ImportProperties(vtkRenderer *)
Definition: vtkImporter.h:144