vtkPythonAnnotationFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
32 #ifndef vtkPythonAnnotationFilter_h
33 #define vtkPythonAnnotationFilter_h
34 
35 #include "vtkPVVTKExtensionsFiltersPythonModule.h" //needed for exports
36 #include "vtkTableAlgorithm.h"
37 
39 {
40 public:
43  void PrintSelf(ostream& os, vtkIndent indent) override;
44 
46 
51  vtkSetStringMacro(Expression);
52  vtkGetStringMacro(Expression);
54 
56 
62  vtkSetMacro(ArrayAssociation, int);
63  vtkGetMacro(ArrayAssociation, int);
65 
67 
70  vtkGetStringMacro(ComputedAnnotationValue);
72 
73  //------------------------------------------------------------------------------
75 
79  vtkGetMacro(DataTimeValid, bool);
80  vtkGetMacro(DataTime, double);
82 
83  vtkGetMacro(NumberOfTimeSteps, int);
84  double GetTimeStep(int index)
85  {
86  return (index < this->NumberOfTimeSteps ? this->TimeSteps[index] : 0.0);
87  }
88 
89  vtkGetMacro(TimeRangeValid, bool);
90  vtkGetVector2Macro(TimeRange, double);
91  vtkGetObjectMacro(CurrentInputDataObject, vtkDataObject);
92  void SetComputedAnnotationValue(const char* value);
93 
94 protected:
96  ~vtkPythonAnnotationFilter() override;
97 
99  int RequestInformation(vtkInformation* request, vtkInformationVector** inputVector,
100  vtkInformationVector* outputVector) override;
101  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
102  vtkInformationVector* outputVector) override;
103 
104  virtual void EvaluateExpression();
105 
106  char* Expression;
109 
110 private:
112  void operator=(const vtkPythonAnnotationFilter&) = delete;
113 
114  bool DataTimeValid;
115  double DataTime;
116  int NumberOfTimeSteps;
117  double* TimeSteps;
118  bool TimeRangeValid;
119  double TimeRange[2];
120  vtkDataObject* CurrentInputDataObject;
121 };
122 
123 #endif
static vtkTableAlgorithm * New()
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
info
#define VTKPVVTKEXTENSIONSFILTERSPYTHON_EXPORT
virtual int FillInputPortInformation(int port, vtkInformation *info)
value
filter used to generate text annotation from Python expressions.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
port
void operator=(const vtkObjectBase &)