VTK  9.6.2
vtkAlgorithm.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
26 <div class="examplegrid">
28 <a href="https://examples.vtk.org/site/Cxx/Developers/vtkTestAlgorithmFilter">
29 <div class="examplegrid_container">
30 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Developers/TestvtkTestAlgorithmFilter.png">
31 <div class="examplegrid_overlay">
32 <div class="examplegrid_text">vtkTestAlgorithmFilter</div>
33 </div>
34 </div>
35 </a>
37
38 <a href="https://examples.vtk.org/site/Cxx/Developers/vtkTestAlgorithmSource">
39 <div class="examplegrid_container">
40 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Developers/TestvtkTestAlgorithmSource.png">
41 <div class="examplegrid_overlay">
42 <div class="examplegrid_text">vtkTestAlgorithmSource</div>
43 </div>
44 </div>
45 </a>
46
47
48 <a href="https://examples.vtk.org/site/Cxx/Developers/vtkTestFilterProgressFilter">
49 <div class="examplegrid_container">
50 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Developers/TestvtkTestFilterProgressFilter.png">
51 <div class="examplegrid_overlay">
52 <div class="examplegrid_text">vtkTestFilterProgressFilter</div>
53 </div>
54 </div>
55 </a>
56
57
58 <a href="https://examples.vtk.org/site/Cxx/Developers/vtkTestFilterSelfProgressFilter">
59 <div class="examplegrid_container">
60 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Developers/TestvtkTestFilterSelfProgressFilter.png">
61 <div class="examplegrid_overlay">
62 <div class="examplegrid_text">vtkTestFilterSelfProgressFilter</div>
63 </div>
64 </div>
65 </a>
66
67
68 <a href="https://examples.vtk.org/site/Cxx/Developers/vtkTestProgressReportFilter">
69 <div class="examplegrid_container">
70 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Developers/TestvtkTestProgressReportFilter.png">
71 <div class="examplegrid_overlay">
72 <div class="examplegrid_text">vtkTestProgressReportFilter</div>
73 </div>
74 </div>
75 </a>
76
77
78 <a href="https://examples.vtk.org/site/Cxx/GeometricObjects/OpenVRTessellatedBoxSource">
79 <div class="examplegrid_container">
80 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/GeometricObjects/TestOpenVRTessellatedBoxSource.png">
81 <div class="examplegrid_overlay">
82 <div class="examplegrid_text">OpenVRTessellatedBoxSource</div>
83 </div>
84 </div>
85 </a>
86
87
88 <a href="https://examples.vtk.org/site/Cxx/GeometricObjects/TessellatedBoxSource">
89 <div class="examplegrid_container">
90 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/GeometricObjects/TestTessellatedBoxSource.png">
91 <div class="examplegrid_overlay">
92 <div class="examplegrid_text">TessellatedBoxSource</div>
93 </div>
94 </div>
95 </a>
96
97
98 <a href="https://examples.vtk.org/site/Cxx/Interaction/EllipticalButton">
99 <div class="examplegrid_container">
100 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Interaction/TestEllipticalButton.png">
101 <div class="examplegrid_overlay">
102 <div class="examplegrid_text">EllipticalButton</div>
103 </div>
104 </div>
105 </a>
106
108 <a href="https://examples.vtk.org/site/Cxx/Visualization/ReverseAccess">
109 <div class="examplegrid_container">
110 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/Visualization/TestReverseAccess.png">
111 <div class="examplegrid_overlay">
112 <div class="examplegrid_text">ReverseAccess</div>
113 </div>
114 </div>
115 </a>
116
117
118 <a href="https://examples.vtk.org/site/Cxx/VolumeRendering/FixedPointVolumeRayCastMapperCT">
119 <div class="examplegrid_container">
120 <img src="/Kitware/vtk-examples/gh-pages/src/Testing/Baseline//Cxx/VolumeRendering/TestFixedPointVolumeRayCastMapperCT.png">
121 <div class="examplegrid_overlay">
122 <div class="examplegrid_text">FixedPointVolumeRayCastMapperCT</div>
123 </div>
124 </div>
125 </a>
126
127 </div>
129 @endhtmlonly
130
131 @par Tests:
132 @ref c2_vtk_t_vtkAlgorithm "vtkAlgorithm (Tests)"
133 */
134
135#ifndef vtkAlgorithm_h
136#define vtkAlgorithm_h
137
138#include "vtkArrayComponents.h" // For enum
139#include "vtkCommonExecutionModelModule.h" // For export macro
140#include "vtkObject.h"
141#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
142
143VTK_ABI_NAMESPACE_BEGIN
144class vtkAbstractArray;
145class vtkAlgorithmInternals;
147class vtkCollection;
148class vtkDataArray;
149class vtkDataObject;
150class vtkExecutive;
151class vtkInformation;
158
159class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALMANUAL vtkAlgorithm : public vtkObject
160{
161public:
162 static vtkAlgorithm* New();
163 vtkTypeMacro(vtkAlgorithm, vtkObject);
164 void PrintSelf(ostream& os, vtkIndent indent) override;
165
182 * SINGLE_PRECISION - Output single-precision floating-point (i.e. float)
183 * DOUBLE_PRECISION - Output double-precision floating-point (i.e. double)
184 * DEFAULT_PRECISION - Output precision should match the input precision.
185 */
192
204
210 virtual void SetExecutive(vtkExecutive* executive);
211
237
243 vtkInformation* request, vtkCollection* inInfo, vtkInformationVector* outInfo);
244
251 vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime);
252
260 virtual int ModifyRequest(vtkInformation* request, int when);
261
269
277
279
282 vtkGetObjectMacro(Information, vtkInformation);
285
290
295
297
300 bool UsesGarbageCollector() const override { return true; }
302
307
309
315 vtkBooleanMacro(AbortExecute, vtkTypeBool);
317
319
322 vtkGetMacro(Progress, double);
324
330 void UpdateProgress(double amount);
331
336
338
344 {
345 this->ContainerAlgorithm = containerAlg;
347 vtkAlgorithm* GetContainerAlgorithm() { return this->ContainerAlgorithm; }
349
351
358 vtkSetMacro(AbortOutput, bool);
359 vtkGetMacro(AbortOutput, bool);
361
363
375 void SetProgressShiftScale(double shift, double scale);
376 vtkGetMacro(ProgressShift, double);
377 vtkGetMacro(ProgressScale, double);
379
388 void SetProgressText(const char* ptext);
389 vtkGetStringMacro(ProgressText);
391
393
397 vtkGetMacro(ErrorCode, unsigned long);
399
400 // left public for performance since it is used in inner loops
401 std::atomic<vtkTypeBool> AbortExecute;
402
432
442
456
462
464
482 const char* name, int fieldAssociation, int component = vtkArrayComponents::AllComponents);
485
508 int idx, int port, int connection, int fieldAssociation, const char* name);
524 int idx, int port, int connection, int fieldAssociation, const char* name, int component);
526
528
543 int idx, int port, int connection, int fieldAssociation, int fieldAttributeType);
560 int idx, int port, int connection, int fieldAssociation, int fieldAttributeType, int component);
562
567 virtual void SetInputArrayToProcess(int idx, vtkInformation* info);
568
600 virtual void SetInputArrayToProcess(int idx, int port, int connection,
601 const char* fieldAssociation, const char* attributeTypeorName);
602 virtual void SetInputArrayToProcess(int idx, int port, int connection,
603 const char* fieldAssociation, const char* attributeTypeorName, const char* component);
605
610
627
628 // from here down are convenience methods that really are executive methods
629
634
645 vtkDataObject* GetInputDataObject(int port, int connection);
646
648
661 virtual void SetInputConnection(int port, vtkAlgorithmOutput* input);
664
666
675 virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
678
688 virtual void RemoveInputConnection(int port, vtkAlgorithmOutput* input);
693 virtual void RemoveInputConnection(int port, int idx);
694
698 virtual void RemoveAllInputConnections(int port);
699
708 virtual void SetInputDataObject(int port, vtkDataObject* data);
709 virtual void SetInputDataObject(vtkDataObject* data) { this->SetInputDataObject(0, data); }
716 virtual void AddInputDataObject(int port, vtkDataObject* data);
717 virtual void AddInputDataObject(vtkDataObject* data) { this->AddInputDataObject(0, data); }
718
732
737
747 vtkAlgorithm* GetInputAlgorithm(int port, int index, int& algPort);
748
752 vtkAlgorithm* GetInputAlgorithm(int port, int index);
753
758
763 vtkExecutive* GetInputExecutive(int port, int index);
764
769
772 * a particular input connection. This can be used to get
773 * meta-data coming from the REQUEST_INFORMATION pass and set
774 * requests for the REQUEST_UPDATE_EXTENT pass. NOTE:
775 * Do not use this in any of the pipeline passes. Use
776 * the information objects passed as arguments instead.
777 */
778 vtkInformation* GetInputInformation(int port, int index);
779
784
793
795
799 virtual void Update(int port);
801 virtual void Update();
803
826 virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
827
834
841 virtual int UpdatePiece(
842 int piece, int numPieces, int ghostLevels, const int extents[6] = nullptr);
843
850 virtual int UpdateExtent(const int extents[6]);
851
859 virtual int UpdateTimeStep(double time, int piece = -1, int numPieces = 1, int ghostLevels = 0,
860 const int extents[6] = nullptr);
861
866 virtual void UpdateInformation();
867
871 virtual void UpdateDataObject();
872
876 virtual void PropagateUpdateExtent();
877
882 virtual void UpdateWholeExtent();
883
888 void ConvertTotalInputToPortConnection(int ind, int& port, int& conn);
889
890 //======================================================================
891 // The following block of code is to support old style VTK applications. If
892 // you are using these calls there are better ways to do it in the new
893 // pipeline
894 //======================================================================
895
897
905
906 //========================================================================
907
909
916 int UpdateExtentIsEmpty(vtkInformation* pinfo, int extentType);
918
924
926
931 int* GetUpdateExtent() VTK_SIZEHINT(6) { return this->GetUpdateExtent(0); }
932 int* GetUpdateExtent(int port) VTK_SIZEHINT(6);
933 void GetUpdateExtent(int& x0, int& x1, int& y0, int& y1, int& z0, int& z1)
934 {
935 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
936 }
937 void GetUpdateExtent(int port, int& x0, int& x1, int& y0, int& y1, int& z0, int& z1);
938 void GetUpdateExtent(int extent[6]) { this->GetUpdateExtent(0, extent); }
939 void GetUpdateExtent(int port, int extent[6]);
941
943
948 int GetUpdatePiece() { return this->GetUpdatePiece(0); }
949 int GetUpdatePiece(int port);
952 int GetUpdateGhostLevel() { return this->GetUpdateGhostLevel(0); }
953 int GetUpdateGhostLevel(int port);
955
957
969
971
981 void SetNoPriorTemporalAccessInformationKey(int key);
982 void SetNoPriorTemporalAccessInformationKey();
984
990
991protected:
993 ~vtkAlgorithm() override;
994
995 // Time stamp to store the last time any filter was aborted.
997
998 // Time stamp to store the last time this filter checked for an
999 // abort.
1001
1002 // Keys used to indicate that input/output port information has been
1003 // filled.
1005
1006 // Arbitrary extra information associated with this algorithm
1008
1014
1020 virtual int FillInputPortInformation(int port, vtkInformation* info);
1021
1027 virtual int FillOutputPortInformation(int port, vtkInformation* info);
1028
1032 virtual void SetNumberOfInputPorts(int n);
1033
1037 virtual void SetNumberOfOutputPorts(int n);
1038
1039 // Helper methods to check input/output port index ranges.
1040 int InputPortIndexInRange(int index, const char* action);
1041 int OutputPortIndexInRange(int index, const char* action);
1042
1048
1050
1058 int GetInputArrayAssociation(int idx, int connection, vtkInformationVector** inputVector);
1061
1082
1084
1090 int idx, vtkInformationVector** inputVector, int& association);
1092
1094
1102 vtkDataArray* GetInputArrayToProcess(int idx, int connection, vtkInformationVector** inputVector);
1104 int idx, int connection, vtkInformationVector** inputVector, int& association);
1106 vtkDataArray* GetInputArrayToProcess(int idx, vtkDataObject* input, int& association);
1108
1110
1116 int idx, vtkInformationVector** inputVector, int& association);
1118
1120
1129 int idx, int connection, vtkInformationVector** inputVector);
1131 int idx, int connection, vtkInformationVector** inputVector, int& association);
1135
1137
1166 vtkSmartPointer<vtkAbstractArray> GetInputArray(int idx, int connection,
1167 vtkInformationVector** inputVector, int& association,
1168 int requestedComponent = vtkArrayComponents::Requested);
1170 int requestedComponent = vtkArrayComponents::Requested);
1171 template <typename ArrayType, typename... Params>
1173 {
1174 auto abstractArray = this->GetInputArray(std::forward<Params>(params)...);
1175 auto* castArray = ArrayType::SafeDownCast(abstractArray.GetPointer());
1176 auto result = vtkSmartPointer<ArrayType>(castArray);
1177 return result;
1178 }
1179
1180
1189
1197
1199
1203 vtkSetMacro(ErrorCode, unsigned long);
1204 unsigned long ErrorCode;
1206
1207 // Progress/Update handling
1208 double Progress;
1210
1211 // Garbage collection support.
1213
1214 // executive methods below
1215
1222 virtual void SetNthInputConnection(int port, int index, vtkAlgorithmOutput* input);
1223
1230 virtual void SetNumberOfInputConnections(int port, int n);
1231
1233
1241 {
1242 this->SetInputDataObject(port, input);
1243 }
1245 {
1246 this->AddInputDataObject(port, input);
1247 }
1248
1250
1251private:
1252 vtkExecutive* Executive;
1253 vtkInformationVector* InputPortInformation;
1254 vtkInformationVector* OutputPortInformation;
1255 vtkAlgorithmInternals* AlgorithmInternal;
1256 static void ConnectionAdd(
1257 vtkAlgorithm* producer, int producerPort, vtkAlgorithm* consumer, int consumerPort);
1258 static void ConnectionRemove(
1259 vtkAlgorithm* producer, int producerPort, vtkAlgorithm* consumer, int consumerPort);
1260 static void ConnectionRemoveAllInput(vtkAlgorithm* consumer, int port);
1261 static void ConnectionRemoveAllOutput(vtkAlgorithm* producer, int port);
1262
1263 vtkAlgorithm(const vtkAlgorithm&) = delete;
1264 void operator=(const vtkAlgorithm&) = delete;
1265
1266 double ProgressShift;
1267 double ProgressScale;
1268 vtkAlgorithm* ContainerAlgorithm;
1269 bool AbortOutput;
1270};
1271
1272VTK_ABI_NAMESPACE_END
1273#endif
Abstract superclass for all arrays.
Proxy object to connect input/output ports.
Superclass for all sources, filters, and sinks in VTK.
virtual void UpdateDataObject()
Create output object(s).
vtkAlgorithmOutput * GetInputConnection(int port, int index)
Get the algorithm output port connected to an input port.
int GetUpdatePiece(int port)
These functions return the update extent for output ports that use piece extents.
void UpdateProgress(double amount)
Update the progress of the process object.
vtkInformation * GetInputArrayInformation(int idx)
Get the info object for the specified input array to this algorithm.
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)
Remove a connection from the given input port index.
virtual void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName, const char *component)
Set the input data arrays that this algorithm will process.
int GetUpdateGhostLevel()
These functions return the update extent for output ports that use piece extents.
void GetUpdateExtent(int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
These functions return the update extent for output ports that use 3D extents.
vtkInformation * GetOutputPortInformation(int port)
Get the information object associated with an output port.
virtual void AddInputDataObject(vtkDataObject *data)
virtual void SetInputDataObject(vtkDataObject *data)
int UpdateExtentIsEmpty(vtkInformation *pinfo, int extentType)
This detects when the UpdateExtent will generate no data This condition is satisfied when the UpdateE...
int UpdateExtentIsEmpty(vtkInformation *pinfo, vtkDataObject *output)
This detects when the UpdateExtent will generate no data This condition is satisfied when the UpdateE...
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name, int component)
This method variant also accepts a component to consider rather than the entire tuple.
void GetUpdateExtent(int extent[6])
These functions return the update extent for output ports that use 3D extents.
int GetUpdatePiece()
These functions return the update extent for output ports that use piece extents.
vtkAlgorithm * GetContainerAlgorithm()
Set/get a Container algorithm for this algorithm.
virtual vtkTypeBool Update(vtkInformation *requests)
Convenience method to update an algorithm after passing requests to its first output port.
void SetContainerAlgorithm(vtkAlgorithm *containerAlg)
Set/get a Container algorithm for this algorithm.
vtkDataObject * GetOutputDataObject(int port)
Get the data object that will contain the algorithm output for the given port.
vtkExecutive * GetInputExecutive()
Equivalent to GetInputExecutive(0, 0).
vtkExecutive * GetInputExecutive(int port, int index)
Returns the executive associated with a particular input connection.
virtual void RemoveAllInputConnections(int port)
Removes all input connections.
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
A special version of ProcessRequest meant specifically for the pipeline modified time request.
virtual void AddInputConnection(vtkAlgorithmOutput *input)
Add a connection to the given input port index.
virtual vtkTypeBool Update(int port, vtkInformationVector *requests)
This method enables the passing of data requests to the algorithm to be used during execution (in add...
virtual int UpdatePiece(int piece, int numPieces, int ghostLevels, const int extents[6]=nullptr)
Convenience method to update an algorithm after passing requests to its first output port.
virtual void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
Set the input data arrays that this algorithm will process.
virtual vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
int GetNumberOfOutputPorts()
Get the number of output ports provided by the algorithm.
virtual int ModifyRequest(vtkInformation *request, int when)
This method gives the algorithm a chance to modify the contents of a request before or after (specifi...
void ReleaseDataFlagOff()
Turn release data flag on or off for all output ports.
int GetNumberOfInputPorts()
Get the number of input ports used by the algorithm.
void ReleaseDataFlagOn()
Turn release data flag on or off for all output ports.
void SetProgressShiftScale(double shift, double scale)
Specify the shift and scale values to use to apply to the progress amount when UpdateProgress is call...
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0).
void GetUpdateExtent(int port, int extent[6])
These functions return the update extent for output ports that use 3D extents.
virtual void SetReleaseDataFlag(vtkTypeBool)
Turn release data flag on or off for all output ports.
vtkInformation * GetOutputInformation(int port)
Return the information object that is associated with a particular output port.
vtkInformation * GetInputPortInformation(int port)
Get the information object associated with an input port.
int GetUpdateGhostLevel(int port)
These functions return the update extent for output ports that use piece extents.
int * GetUpdateExtent(int port)
These functions return the update extent for output ports that use 3D extents.
void SetInputArrayToProcess(const char *name, int fieldAssociation, int component=vtkArrayComponents::AllComponents)
Set the input data arrays that this algorithm will process.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
Set the input data arrays that this algorithm will process.
vtkTypeBool HasExecutive()
Check whether this algorithm has an assigned executive.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, int fieldAttributeType, int component)
This method variant also accepts a component to consider rather than the entire tuple.
virtual void AddInputDataObject(int port, vtkDataObject *data)
Add the data-object as an input to this given port.
vtkAlgorithmOutput * GetOutputPort()
static void SetDefaultExecutivePrototype(vtkExecutive *proto)
If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using Ne...
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
bool CheckAbort()
Checks to see if this filter should abort.
bool ResetInputArraySpecifications()
Clear all existing input array specifications (as if SetInputArrayToProcess had never been called).
vtkAlgorithm * GetInputAlgorithm(int port, int index)
Returns the algorithm connected to a port-index pair.
static vtkAlgorithm * New()
void SetProgressObserver(vtkProgressObserver *)
If an ProgressObserver is set, the algorithm will report progress through it rather than directly.
virtual void SetInputArrayToProcess(int idx, vtkInformation *info)
Set the input data arrays that this algorithm will process.
void SetAbortExecuteAndUpdateTime()
Set AbortExecute Flag and update LastAbortTime.
virtual void UpdateWholeExtent()
Bring this algorithm's outputs up-to-date.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
int GetTotalNumberOfInputConnections()
Get the total number of inputs for this algorithm.
virtual void SetInputConnection(vtkAlgorithmOutput *input)
Set the connection for the given input port index.
void ConvertTotalInputToPortConnection(int ind, int &port, int &conn)
Convenience routine to convert from a linear ordering of input connections to a port/connection pair.
virtual void SetExecutive(vtkExecutive *executive)
Set this algorithm's executive.
bool UsesGarbageCollector() const override
Participate in garbage collection.
virtual vtkTypeBool GetReleaseDataFlag()
Turn release data flag on or off for all output ports.
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
void SetProgressText(const char *ptext)
Set the current text message associated with the progress state.
virtual void PropagateUpdateExtent()
Propagate meta-data upstream.
virtual void Update(int port)
Bring this algorithm's outputs up-to-date.
std::atomic< vtkTypeBool > AbortExecute
vtkExecutive * GetExecutive()
Get this algorithm's executive.
virtual int UpdateExtent(const int extents[6])
Convenience method to update an algorithm after passing requests to its first output port.
int GetUpdateNumberOfPieces()
These functions return the update extent for output ports that use piece extents.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
Version of ProcessRequest() that is wrapped.
DesiredOutputPrecision
Values used for setting the desired output precision for various algorithms.
virtual void SetInputDataObject(int port, vtkDataObject *data)
Sets the data-object as an input on the given port index.
void GetUpdateExtent(int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
These functions return the update extent for output ports that use 3D extents.
virtual void RemoveInputConnection(int port, int idx)
Remove a connection given by index idx.
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
Set the input data arrays that this algorithm will process.
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
vtkDataObject * GetInputDataObject(int port, int connection)
Get the data object that will contain the algorithm input for the given port and given connection.
virtual void UpdateInformation()
Bring the algorithm's information up-to-date.
vtkAlgorithmOutput * GetOutputPort(int index)
Get a proxy object corresponding to the given output port of this algorithm.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int GetUpdateNumberOfPieces(int port)
These functions return the update extent for output ports that use piece extents.
int GetNumberOfInputArraySpecifications()
Get the number of input array indices that have already been set.
vtkInformation * GetInputInformation(int port, int index)
Return the information object that is associated with a particular input connection.
virtual int UpdateTimeStep(double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=nullptr)
Convenience method to update an algorithm after passing requests to its first output port.
virtual void SetInformation(vtkInformation *)
Set/Get the information object associated with this algorithm.
virtual void Update()
Bring this algorithm's outputs up-to-date.
virtual void AddInputConnection(int port, vtkAlgorithmOutput *input)
Add a connection to the given input port index.
void RemoveAllInputs()
Remove all the input data.
vtkAlgorithm * GetInputAlgorithm(int port, int index, int &algPort)
Returns the algorithm and the output port index of that algorithm connected to a port-index pair.
create and manipulate ordered lists of objects
general representation of visualization data
Superclass for all pipeline executives in VTK.
Detect and break reference loops.
a simple class to control print indentation
Definition vtkIndent.h:108
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
virtual void ReportReferences(vtkGarbageCollector *)
Basic class to optionally replace vtkAlgorithm progress functionality.
Hold a reference to a vtkObjectBase instance.
record modification and/or execution time
static vtkInformationStringVectorKey * INPUT_REQUIRED_DATA_TYPE()
static vtkInformationIntegerKey * INPUT_IS_OPTIONAL()
Keys used to specify input port requirements.
static vtkInformationIntegerKey * CAN_HANDLE_PIECE_REQUEST()
Key that tells the pipeline that a particular algorithm can or cannot handle piece request.
static vtkInformationIntegerKey * INPUT_PORT()
static vtkInformationInformationVectorKey * INPUT_REQUIRED_FIELDS()
static vtkInformationInformationVectorKey * INPUT_ARRAYS_TO_PROCESS()
static vtkInformationIntegerKey * INPUT_CONNECTION()
static vtkInformationIntegerKey * CAN_PRODUCE_SUB_EXTENT()
This key tells the executive that a particular output port is capable of producing an arbitrary subex...
static vtkInformationIntegerKey * ABORTED()
static vtkInformationIntegerKey * INPUT_IS_REPEATABLE()
int vtkTypeBool
Definition vtkABI.h:64
*vtkDataArray * GetInputArrayToProcess(int idx, vtkInformationVector **inputVector, int &association)
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
void AddInputDataInternal(int port, vtkDataObject *input)
virtual void SetNumberOfInputConnections(int port, int n)
Set the number of input connections on the given input port.
virtual void SetNumberOfOutputPorts(int n)
Set the number of output ports provided by the algorithm.
void SetInputDataInternal(int port, vtkDataObject *input)
These methods are used by subclasses to implement methods to set data objects directly as input.
*unsigned long ErrorCode
static vtkTimeStamp LastAbortTime
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
vtkTimeStamp LastAbortCheckTime
char * ProgressText
~vtkAlgorithm() override
vtkProgressObserver * ProgressObserver
**vtkSmartPointer< vtkAbstractArray > GetInputArray(int idx, vtkDataObject *input, int &association, int requestedComponent=vtkArrayComponents::Requested)
**vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkInformationVector **inputVector, int &association)
vtkInformation * Information
vtkSmartPointer< ArrayType > GetInputArrayAs(Params &&... params)
static vtkInformationIntegerKey * PORT_REQUIREMENTS_FILLED()
*double Progress
bool CheckUpstreamAbort()
Checks to see if an upstream filter has been aborted.
int GetInputArrayAssociation(int idx, vtkInformationVector **inputVector)
Get the association of the actual data array for the input array specified by idx,...
virtual void SetNumberOfInputPorts(int n)
Set the number of input ports used by the algorithm.
virtual void SetInputDataObject(int port, vtkDataObject *data)
Sets the data-object as an input on the given port index.
*int GetInputArrayComponent(int idx)
Get the component to process of the actual data array for the input array specified by idx,...
vtkAlgorithm vtkObject RemoveNoPriorTemporalAccessInformationKey()
Removes any information key vtkStreamingDemandDrivenPipeline::NO_PRIOR_TEMPORAL_ACCESS() to all outpu...
virtual void SetNthInputConnection(int port, int index, vtkAlgorithmOutput *input)
Replace the Nth connection on the given input port.
static vtkExecutive * DefaultExecutivePrototype
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
int OutputPortIndexInRange(int index, const char *action)
virtual void AddInputDataObject(int port, vtkDataObject *data)
Add the data-object as an input to this given port.
*vtkInformation * GetInputArrayFieldInformation(int idx, vtkInformationVector **inputVector)
This method takes in an index (as specified in SetInputArrayToProcess) and a pipeline information vec...
int InputPortIndexInRange(int index, const char *action)
@ AllComponents
@ Requested
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:323
#define VTK_SIZEHINT(...)
#define VTK_UNBLOCKTHREADS
#define VTK_MARSHALMANUAL
#define vtkAlgorithm