vtkPythonAnnotationFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
25 #ifndef vtkPythonAnnotationFilter_h
26 #define vtkPythonAnnotationFilter_h
27 
28 #include "vtkPVVTKExtensionsFiltersPythonModule.h" //needed for exports
29 #include "vtkTableAlgorithm.h"
30 
32 {
33 public:
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
39 
44  vtkSetStringMacro(Expression);
45  vtkGetStringMacro(Expression);
47 
49 
55  vtkSetMacro(ArrayAssociation, int);
56  vtkGetMacro(ArrayAssociation, int);
58 
60 
63  vtkGetStringMacro(ComputedAnnotationValue);
65 
66  //------------------------------------------------------------------------------
68 
72  vtkGetMacro(DataTimeValid, bool);
73  vtkGetMacro(DataTime, double);
75 
76  vtkGetMacro(NumberOfTimeSteps, int);
77  double GetTimeStep(int index)
78  {
79  return (index < this->NumberOfTimeSteps ? this->TimeSteps[index] : 0.0);
80  }
81 
82  vtkGetMacro(TimeRangeValid, bool);
83  vtkGetVector2Macro(TimeRange, double);
84  vtkGetObjectMacro(CurrentInputDataObject, vtkDataObject);
85  void SetComputedAnnotationValue(const char* value);
86 
87 protected:
89  ~vtkPythonAnnotationFilter() override;
90 
92  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
93  vtkInformationVector* outputVector) override;
94 
95  virtual void EvaluateExpression();
96 
97  char* Expression;
100 
101 private:
103  void operator=(const vtkPythonAnnotationFilter&) = delete;
104 
105  bool DataTimeValid;
106  double DataTime;
107  int NumberOfTimeSteps;
108  double* TimeSteps;
109  bool TimeRangeValid;
110  double TimeRange[2];
111  vtkDataObject* CurrentInputDataObject;
112 };
113 
114 #endif
static vtkTableAlgorithm * New()
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 &)