vtkPythonRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPythonRepresentation.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 =========================================================================*/
23 #ifndef vtkPythonRepresentation_h
24 #define vtkPythonRepresentation_h
25 
27 
28 #include "vtkRemotingViewsPythonModule.h" //needed for exports
29 
30 class vtkReductionFilter;
31 
33 {
34 public:
35  static vtkPythonRepresentation* New();
37  void PrintSelf(ostream& os, vtkIndent indent) override;
38 
47  vtkInformation* outInfo) override;
48 
50 
54  vtkGetMacro(LocalInput, vtkDataObject*);
56 
58 
61  vtkGetMacro(ClientDataObject, vtkDataObject*);
63 
68  int GetNumberOfAttributeArrays(int attributeType);
69 
74  const char* GetAttributeArrayName(int attributeType, int arrayIndex);
75 
83  void SetAttributeArrayStatus(int attributeType, const char* name, int status);
84 
90  int GetAttributeArrayStatus(int attributeType, const char* name);
91 
95  void EnableAllAttributeArrays();
96 
100  void DisableAllAttributeArrays();
101 
102 protected:
104  ~vtkPythonRepresentation() override;
105 
109  int FillInputPortInformation(int port, vtkInformation* info) override;
110 
115 
116 private:
118  void operator=(const vtkPythonRepresentation&) = delete;
119 
123  vtkDataObject* LocalInput;
124 
128  vtkDataObject* ClientDataObject;
129 
131 
134  class vtkPythonRepresentationInternal;
135  vtkPythonRepresentationInternal* Internal;
137 
142  void InitializePreGatherHelper(vtkReductionFilter* reductionFilter, vtkDataObject* input);
143 
148  void InitializePostGatherHelper(vtkReductionFilter* reductionFilter, vtkDataObject* input);
149 
153  bool HasProcessRole(vtkTypeUInt32 role);
154 
158  bool IsClientProcess();
159 
163  bool IsDataServerProcess();
164 
168  int SendDataTypeToClient(int& dataType);
169 
173  void TransferLocalDataToClient();
174 };
175 
176 #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.