vtkPythonRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
11 #ifndef vtkPythonRepresentation_h
12 #define vtkPythonRepresentation_h
13 
15 
16 #include "vtkRemotingViewsPythonModule.h" //needed for exports
17 
18 class vtkReductionFilter;
19 
21 {
22 public:
23  static vtkPythonRepresentation* New();
25  void PrintSelf(ostream& os, vtkIndent indent) override;
26 
35  vtkInformation* outInfo) override;
36 
38 
42  vtkGetMacro(LocalInput, vtkDataObject*);
44 
46 
49  vtkGetMacro(ClientDataObject, vtkDataObject*);
51 
56  int GetNumberOfAttributeArrays(int attributeType);
57 
62  const char* GetAttributeArrayName(int attributeType, int arrayIndex);
63 
71  void SetAttributeArrayStatus(int attributeType, const char* name, int status);
72 
78  int GetAttributeArrayStatus(int attributeType, const char* name);
79 
83  void EnableAllAttributeArrays();
84 
88  void DisableAllAttributeArrays();
89 
90 protected:
92  ~vtkPythonRepresentation() override;
93 
97  int FillInputPortInformation(int port, vtkInformation* info) override;
98 
103 
104 private:
106  void operator=(const vtkPythonRepresentation&) = delete;
107 
111  vtkDataObject* LocalInput;
112 
116  vtkDataObject* ClientDataObject;
117 
119 
122  class vtkPythonRepresentationInternal;
123  vtkPythonRepresentationInternal* Internal;
125 
130  void InitializePreGatherHelper(vtkReductionFilter* reductionFilter, vtkDataObject* input);
131 
136  void InitializePostGatherHelper(vtkReductionFilter* reductionFilter, vtkDataObject* input);
137 
141  bool HasProcessRole(vtkTypeUInt32 role);
142 
146  bool IsClientProcess();
147 
151  bool IsDataServerProcess();
152 
156  int SendDataTypeToClient(int& dataType);
157 
161  void TransferLocalDataToClient();
162 };
163 
164 #endif // vtkPythonRepresentation_h
vtkPVDataRepresentation adds some ParaView specific API to data representations.
Representation for showing data in a vtkPythonView.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
static vtkDataRepresentation * New()
void PrintSelf(ostream &os, vtkIndent indent) override
#define VTKREMOTINGVIEWSPYTHON_EXPORT
A generic filter that can reduce any type of dataset using any reduction algorithm.