vtkPythonAnnotationFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPythonAnnotationFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
37 #ifndef vtkPythonAnnotationFilter_h
38 #define vtkPythonAnnotationFilter_h
39 
40 #include "vtkPVVTKExtensionsFiltersPythonModule.h" //needed for exports
41 #include "vtkTableAlgorithm.h"
42 
44 {
45 public:
48  void PrintSelf(ostream& os, vtkIndent indent) override;
49 
51 
56  vtkSetStringMacro(Expression);
57  vtkGetStringMacro(Expression);
59 
61 
67  vtkSetMacro(ArrayAssociation, int);
68  vtkGetMacro(ArrayAssociation, int);
70 
72 
75  vtkGetStringMacro(ComputedAnnotationValue);
77 
78  //------------------------------------------------------------------------------
80 
84  vtkGetMacro(DataTimeValid, bool);
85  vtkGetMacro(DataTime, double);
87 
88  vtkGetMacro(NumberOfTimeSteps, int);
89  double GetTimeStep(int index)
90  {
91  return (index < this->NumberOfTimeSteps ? this->TimeSteps[index] : 0.0);
92  }
93 
94  vtkGetMacro(TimeRangeValid, bool);
95  vtkGetVector2Macro(TimeRange, double);
96  vtkGetObjectMacro(CurrentInputDataObject, vtkDataObject);
97  void SetComputedAnnotationValue(const char* value);
98 
99 protected:
101  ~vtkPythonAnnotationFilter() override;
102 
103  int FillInputPortInformation(int port, vtkInformation* info) override;
104  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
105  vtkInformationVector* outputVector) override;
106 
107  virtual void EvaluateExpression();
108 
109  char* Expression;
112 
113 private:
115  void operator=(const vtkPythonAnnotationFilter&) = delete;
116 
117  bool DataTimeValid;
118  double DataTime;
119  int NumberOfTimeSteps;
120  double* TimeSteps;
121  bool TimeRangeValid;
122  double TimeRange[2];
123  vtkDataObject* CurrentInputDataObject;
124 };
125 
126 #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 &)