vtkCinemaDatabase.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCinemaDatabase.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 =========================================================================*/
26 #ifndef vtkCinemaDatabase_h
27 #define vtkCinemaDatabase_h
28 
29 #include "vtkObject.h"
30 #include "vtkRemotingCinemaModule.h" // for export macros
31 #include "vtkSmartPointer.h" // for vtkSmartPointer
32 
33 #include <string> // for string
34 #include <vector> // for vector
35 
36 class vtkImageData;
37 class vtkCamera;
38 
39 class VTKREMOTINGCINEMA_EXPORT vtkCinemaDatabase : public vtkObject
40 {
41 public:
42  static vtkCinemaDatabase* New();
43  vtkTypeMacro(vtkCinemaDatabase, vtkObject);
44  void PrintSelf(ostream& os, vtkIndent indent) override;
45 
46  enum Spec
47  {
48  UNKNOWN = -1,
50  CINEMA_SPEC_C
51  };
52 
58  bool Load(const char* fname);
59 
64  std::vector<std::string> GetPipelineObjects() const;
65 
69  std::vector<std::string> GetPipelineObjectParents(const std::string& objectname) const;
70 
74  bool GetPipelineObjectVisibility(const std::string& objectname) const;
75 
76  // Description:
77  // Given a object's name, it returns a list of control parameters (may be empty).
78  std::vector<std::string> GetControlParameters(const std::string& objectname) const;
79 
80  // Description:
81  // Get values for a control parameter. For convenience they are returned as
82  // strings.
83  std::vector<std::string> GetControlParameterValues(const std::string& parameter) const;
84 
85  // Description:
86  // Get the name for the field associated with the object. `GetFieldValues` will
87  // returns values for this field.
88  std::string GetFieldName(const std::string& objectname) const;
89 
90  // Description:
91  // Given an object's name, returns a list of fields available for that object.
92  std::vector<std::string> GetFieldValues(
93  const std::string& objectname, const std::string& valuetype) const;
94 
102  bool GetFieldValueRange(
103  const std::string& objectname, const std::string& fieldvalue, double range[2]) const;
104 
105  // Description:
106  // Return timesteps available in the datastore. May returns an empty vector if
107  // no timesteps are present in the dataset.
108  std::vector<std::string> GetTimeSteps() const;
109 
113  std::vector<vtkSmartPointer<vtkImageData> > TranslateQuery(const std::string& query) const;
114 
118  std::vector<vtkSmartPointer<vtkCamera> > Cameras(
119  const std::string& timestep = std::string()) const;
120 
125  int GetSpec() const;
126 
134  std::string GetNearestParameterValue(const std::string& param, double value) const;
135 
136 protected:
138  ~vtkCinemaDatabase() override;
139 
140 private:
141  vtkCinemaDatabase(const vtkCinemaDatabase&) = delete;
142  void operator=(const vtkCinemaDatabase&) = delete;
143 
144  class vtkInternals;
145  vtkInternals* Internals;
146 };
147 
148 #endif
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
class that provides access to cinema_python.database.file_store API.
static vtkObject * New()
void operator=(const vtkObjectBase &)