VTK  9.7.20260915
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
137
138#ifndef vtkAlgorithm_h
139#define vtkAlgorithm_h
140
141#include "vtkArrayComponents.h" // For enum
142#include "vtkCommonExecutionModelModule.h" // For export macro
143#include "vtkObject.h"
144#include "vtkWrappingHints.h" // For VTK_MARSHALMANUAL
145
146VTK_ABI_NAMESPACE_BEGIN
147class vtkAbstractArray;
148class vtkAlgorithmInternals;
150class vtkCollection;
151class vtkDataArray;
152class vtkDataObject;
153class vtkExecutive;
154class vtkInformation;
161
162class VTKCOMMONEXECUTIONMODEL_EXPORT VTK_MARSHALMANUAL vtkAlgorithm : public vtkObject
163{
164public:
165 static vtkAlgorithm* New();
166 vtkTypeMacro(vtkAlgorithm, vtkObject);
167 void PrintSelf(ostream& os, vtkIndent indent) override;
168
195
201
207
213 virtual void SetExecutive(vtkExecutive* executive);
214
239 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo);
240
246 vtkInformation* request, vtkCollection* inInfo, vtkInformationVector* outInfo);
247
254 vtkInformationVector* outInfoVec, int requestFromOutputPort, vtkMTimeType* mtime);
255
263 virtual int ModifyRequest(vtkInformation* request, int when);
264
272
280
282
285 vtkGetObjectMacro(Information, vtkInformation);
288
293
298
300
303 bool UsesGarbageCollector() const override { return true; }
305
310
312
318 vtkBooleanMacro(AbortExecute, vtkTypeBool);
320
322
325 vtkGetMacro(Progress, double);
327
333 void UpdateProgress(double amount);
334
340
349
355
357
363 {
364 this->ContainerAlgorithm = containerAlg;
365 }
366 vtkAlgorithm* GetContainerAlgorithm() { return this->ContainerAlgorithm; }
368
370
377 vtkSetMacro(AbortOutput, bool);
378 vtkGetMacro(AbortOutput, bool);
379 vtkBooleanMacro(AbortOutput, bool);
381
383
395 void SetProgressShiftScale(double shift, double scale);
396 vtkGetMacro(ProgressShift, double);
397 vtkGetMacro(ProgressScale, double);
399
401
408 void SetProgressText(const char* ptext);
409 vtkGetStringMacro(ProgressText);
411
413
417 vtkGetMacro(ErrorCode, unsigned long);
419
420 // left public for performance since it is used in inner loops
421 std::atomic<vtkTypeBool> AbortExecute;
422
452
462
476
482
484
502 const char* name, int fieldAssociation, int component = vtkArrayComponents::AllComponents);
505
528 int idx, int port, int connection, int fieldAssociation, const char* name);
544 int idx, int port, int connection, int fieldAssociation, const char* name, int component);
546
548
563 int idx, int port, int connection, int fieldAssociation, int fieldAttributeType);
580 int idx, int port, int connection, int fieldAssociation, int fieldAttributeType, int component);
582
587 virtual void SetInputArrayToProcess(int idx, vtkInformation* info);
588
590
620 virtual void SetInputArrayToProcess(int idx, int port, int connection,
621 const char* fieldAssociation, const char* attributeTypeorName);
622 virtual void SetInputArrayToProcess(int idx, int port, int connection,
623 const char* fieldAssociation, const char* attributeTypeorName, const char* component);
625
630
642
647
648 // from here down are convenience methods that really are executive methods
649
654
660
665 vtkDataObject* GetInputDataObject(int port, int connection);
666
668
681 virtual void SetInputConnection(int port, vtkAlgorithmOutput* input);
684
686
695 virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
698
708 virtual void RemoveInputConnection(int port, vtkAlgorithmOutput* input);
709
713 virtual void RemoveInputConnection(int port, int idx);
714
718 virtual void RemoveAllInputConnections(int port);
719
728 virtual void SetInputDataObject(int port, vtkDataObject* data);
729 virtual void SetInputDataObject(vtkDataObject* data) { this->SetInputDataObject(0, data); }
730
736 virtual void AddInputDataObject(int port, vtkDataObject* data);
737 virtual void AddInputDataObject(vtkDataObject* data) { this->AddInputDataObject(0, data); }
738
747
752
757
762
767 vtkAlgorithm* GetInputAlgorithm(int port, int index, int& algPort);
768
772 vtkAlgorithm* GetInputAlgorithm(int port, int index);
773
778
783 vtkExecutive* GetInputExecutive(int port, int index);
784
789
798 vtkInformation* GetInputInformation(int port, int index);
799
804
813
815
819 virtual bool Update(int port);
821 virtual bool Update();
823
846 virtual vtkTypeBool Update(int port, vtkInformationVector* requests);
847
854
861 virtual int UpdatePiece(
862 int piece, int numPieces, int ghostLevels, const int extents[6] = nullptr);
863
870 virtual int UpdateExtent(const int extents[6]);
871
879 virtual int UpdateTimeStep(double time, int piece = -1, int numPieces = 1, int ghostLevels = 0,
880 const int extents[6] = nullptr);
881
886 virtual bool UpdateInformation();
887
891 virtual bool UpdateDataObject();
892
896 virtual void PropagateUpdateExtent();
897
902 virtual bool UpdateWholeExtent();
903
908 void ConvertTotalInputToPortConnection(int ind, int& port, int& conn);
909
910 //======================================================================
911 // The following block of code is to support old style VTK applications. If
912 // you are using these calls there are better ways to do it in the new
913 // pipeline
914 //======================================================================
915
917
925
926 //========================================================================
927
929
936 int UpdateExtentIsEmpty(vtkInformation* pinfo, int extentType);
938
944
946
951 int* GetUpdateExtent() VTK_SIZEHINT(6) { return this->GetUpdateExtent(0); }
952 int* GetUpdateExtent(int port) VTK_SIZEHINT(6);
953 void GetUpdateExtent(int& x0, int& x1, int& y0, int& y1, int& z0, int& z1)
954 {
955 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
956 }
957 void GetUpdateExtent(int port, int& x0, int& x1, int& y0, int& y1, int& z0, int& z1);
958 void GetUpdateExtent(int extent[6]) { this->GetUpdateExtent(0, extent); }
959 void GetUpdateExtent(int port, int extent[6]);
961
963
968 int GetUpdatePiece() { return this->GetUpdatePiece(0); }
969 int GetUpdatePiece(int port);
972 int GetUpdateGhostLevel() { return this->GetUpdateGhostLevel(0); }
973 int GetUpdateGhostLevel(int port);
975
977
989
991
1004
1010
1011protected:
1013 ~vtkAlgorithm() override;
1014
1015 // Time stamp to store the last time this filter checked for an
1016 // abort.
1018
1019 // Keys used to indicate that input/output port information has been
1020 // filled.
1022
1023 // Arbitrary extra information associated with this algorithm
1025
1031
1037 virtual int FillInputPortInformation(int port, vtkInformation* info);
1038
1044 virtual int FillOutputPortInformation(int port, vtkInformation* info);
1045
1049 virtual void SetNumberOfInputPorts(int n);
1050
1054 virtual void SetNumberOfOutputPorts(int n);
1055
1056 // Helper methods to check input/output port index ranges.
1057 int InputPortIndexInRange(int index, const char* action);
1058 int OutputPortIndexInRange(int index, const char* action);
1059
1065
1067
1075 int GetInputArrayAssociation(int idx, int connection, vtkInformationVector** inputVector);
1078
1099
1101
1107 int idx, vtkInformationVector** inputVector, int& association);
1109
1111
1119 vtkDataArray* GetInputArrayToProcess(int idx, int connection, vtkInformationVector** inputVector);
1121 int idx, int connection, vtkInformationVector** inputVector, int& association);
1123 vtkDataArray* GetInputArrayToProcess(int idx, vtkDataObject* input, int& association);
1125
1127
1133 int idx, vtkInformationVector** inputVector, int& association);
1135
1137
1146 int idx, int connection, vtkInformationVector** inputVector);
1148 int idx, int connection, vtkInformationVector** inputVector, int& association);
1152
1154
1184 vtkInformationVector** inputVector, int& association,
1185 int requestedComponent = vtkArrayComponents::Requested);
1187 int requestedComponent = vtkArrayComponents::Requested);
1188 template <typename ArrayType, typename... Params>
1190 {
1191 auto abstractArray = this->GetInputArray(std::forward<Params>(params)...);
1192 auto* castArray = ArrayType::SafeDownCast(abstractArray.GetPointer());
1193 auto result = vtkSmartPointer<ArrayType>(castArray);
1194 return result;
1195 }
1196
1197
1206
1214
1216
1220 vtkSetMacro(ErrorCode, unsigned long);
1221 unsigned long ErrorCode;
1223
1224 // Progress/Update handling
1225 double Progress;
1227
1228 // Garbage collection support.
1230
1231 // executive methods below
1232
1239 virtual void SetNthInputConnection(int port, int index, vtkAlgorithmOutput* input);
1240
1247 virtual void SetNumberOfInputConnections(int port, int n);
1248
1250
1258 {
1259 this->SetInputDataObject(port, input);
1260 }
1262 {
1263 this->AddInputDataObject(port, input);
1264 }
1265
1267
1268private:
1269 vtkExecutive* Executive;
1270 vtkInformationVector* InputPortInformation;
1271 vtkInformationVector* OutputPortInformation;
1272 vtkAlgorithmInternals* AlgorithmInternal;
1273 static void ConnectionAdd(
1274 vtkAlgorithm* producer, int producerPort, vtkAlgorithm* consumer, int consumerPort);
1275 static void ConnectionRemove(
1276 vtkAlgorithm* producer, int producerPort, vtkAlgorithm* consumer, int consumerPort);
1277 static void ConnectionRemoveAllInput(vtkAlgorithm* consumer, int port);
1278 static void ConnectionRemoveAllOutput(vtkAlgorithm* producer, int port);
1279
1280 vtkAlgorithm(const vtkAlgorithm&) = delete;
1281 void operator=(const vtkAlgorithm&) = delete;
1282
1283 double ProgressShift;
1284 double ProgressScale;
1285 vtkAlgorithm* ContainerAlgorithm;
1286 bool AbortOutput;
1287};
1288
1289VTK_ABI_NAMESPACE_END
1290#endif
Abstract superclass for all arrays.
Proxy object to connect input/output ports.
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.
int GetInputArrayAssociation(int idx, vtkInformationVector **inputVector)
Get the association of the actual data array for the input array specified by idx,...
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)
Remove a connection from the given input port index.
vtkDataArray * GetInputArrayToProcess(int idx, int connection, vtkInformationVector **inputVector)
Filters that have multiple connections on one port can use this signature.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkInformationVector **inputVector)
Get the actual data array for the input array specified by idx, this is only reasonable during the RE...
virtual void SetNumberOfOutputPorts(int n)
Set the number of output ports provided by the algorithm.
bool CheckAbortAndInvoke()
Invoke AbortCheck event then return CheckAbort result.
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.
virtual void SetNthInputConnection(int port, int index, vtkAlgorithmOutput *input)
Replace the Nth connection on the given input port.
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.
int GetInputArrayAssociation(int idx, vtkDataObject *input)
Filters that have multiple connections on one port can use this signature.
virtual void AddInputDataObject(vtkDataObject *data)
vtkSmartPointer< vtkAbstractArray > GetInputArray(int idx, vtkDataObject *input, int &association, int requestedComponent=vtkArrayComponents::Requested)
Get an array from the input at index idx.
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.
vtkInformation * GetInputArrayFieldInformation(int idx, vtkInformationVector **inputVector)
This method takes in an index (as specified in SetInputArrayToProcess) and a pipeline information vec...
int GetUpdatePiece()
These functions return the update extent for output ports that use piece extents.
vtkInformation * Information
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.
virtual int FillOutputPortInformation(int port, vtkInformation *info)
Fill the output port information objects for this algorithm.
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).
void SetNoPriorTemporalAccessInformationKey()
Set to all output ports of this algorithm the information key vtkStreamingDemandDrivenPipeline::NO_PR...
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.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, int connection, vtkInformationVector **inputVector, int &association)
Filters that have multiple connections on one port can use this signature.
vtkSmartPointer< vtkAbstractArray > GetInputArray(int idx, int connection, vtkInformationVector **inputVector, int &association, int requestedComponent=vtkArrayComponents::Requested)
Get an array from the input at index idx.
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.
static vtkInformationIntegerKey * PORT_REQUIREMENTS_FILLED()
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.
void SetInputDataInternal(int port, vtkDataObject *input)
These methods are used by subclasses to implement methods to set data objects directly as input.
int GetNumberOfInputPorts()
Get the number of input ports used by the algorithm.
int GetInputArrayAssociation(int idx, int connection, vtkInformationVector **inputVector)
Filters that have multiple connections on one port can use this signature.
void ReleaseDataFlagOn()
Turn release data flag on or off for all output ports.
bool CheckUpstreamAbort()
Checks to see if an upstream filter has been aborted.
void SetProgressShiftScale(double shift, double scale)
Specify the shift and scale values to use to apply to the progress amount when UpdateProgress is call...
vtkDataArray * GetInputArrayToProcess(int idx, int connection, vtkInformationVector **inputVector, int &association)
Filters that have multiple connections on one port can use this signature.
vtkDataArray * GetInputArrayToProcess(int idx, vtkInformationVector **inputVector, int &association)
Get the actual data array for the input array specified by idx, this is only reasonable during the RE...
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0).
unsigned long ErrorCode
The error code contains a possible error that occurred while reading or writing the file.
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.
virtual bool UpdateInformation()
Bring the algorithm's information up-to-date.
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.
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
vtkAlgorithmOutput * GetOutputPort()
int OutputPortIndexInRange(int index, const char *action)
static void SetDefaultExecutivePrototype(vtkExecutive *proto)
If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using Ne...
virtual bool Update()
Bring this algorithm's outputs up-to-date.
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
bool CheckAbort()
Check to see if an input's ABORTED flag is set or if an upstream algorithm's AbortExecute is set.
bool ResetInputArraySpecifications()
Clear all existing input array specifications (as if SetInputArrayToProcess had never been called).
void ReportReferences(vtkGarbageCollector *) override
virtual bool Update(int port)
Bring this algorithm's outputs up-to-date.
char * ProgressText
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, int connection, vtkInformationVector **inputVector)
Filters that have multiple connections on one port can use this signature.
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.
int GetInputArrayComponent(int idx)
Get the component to process of the actual data array for the input array specified by idx,...
void RemoveNoPriorTemporalAccessInformationKey()
Removes any information key vtkStreamingDemandDrivenPipeline::NO_PRIOR_TEMPORAL_ACCESS() to all outpu...
virtual void SetInputArrayToProcess(int idx, vtkInformation *info)
Set the input data arrays that this algorithm will process.
vtkDataArray * GetInputArrayToProcess(int idx, vtkInformationVector **inputVector)
Get the actual data array for the input array specified by idx, this is only reasonable during the RE...
void SetAbortExecuteAndUpdateTime()
Set AbortExecute Flag and update LastAbortTime.
virtual bool UpdateWholeExtent()
Bring this algorithm's outputs up-to-date.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual void SetNumberOfInputConnections(int port, int n)
Set the number of input connections on the given input port.
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.
void InvokeCleanupAbortCheck()
Invoke CleanupAbortCheck event, usually used by application to cleanup multi process communications t...
vtkDataArray * GetInputArrayToProcess(int idx, vtkDataObject *input)
Filters that have multiple connections on one port can use this signature.
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.
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.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkInformationVector **inputVector, int &association)
Get the actual data array for the input array specified by idx, this is only reasonable during the RE...
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.
vtkDataArray * GetInputArrayToProcess(int idx, vtkDataObject *input, int &association)
Filters that have multiple connections on one port can use this signature.
vtkTimeStamp LastAbortCheckTime
virtual void SetNumberOfInputPorts(int n)
Set the number of input ports used by the algorithm.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkDataObject *input, int &association)
Filters that have multiple connections on one port can use this signature.
virtual void RemoveInputConnection(int port, int idx)
Remove a connection given by index idx.
vtkSmartPointer< ArrayType > GetInputArrayAs(Params &&... params)
Get an array from the input at 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.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkDataObject *input)
Filters that have multiple connections on one port can use this signature.
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
vtkProgressObserver * ProgressObserver
void SetNoPriorTemporalAccessInformationKey(int key)
Set to all output ports of this algorithm the information key vtkStreamingDemandDrivenPipeline::NO_PR...
vtkDataObject * GetInputDataObject(int port, int connection)
Get the data object that will contain the algorithm input for the given port and given connection.
vtkAlgorithmOutput * GetOutputPort(int index)
Get a proxy object corresponding to the given output port of this algorithm.
virtual bool UpdateDataObject()
Create output object(s).
void AddInputDataInternal(int port, vtkDataObject *input)
~vtkAlgorithm() override
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 InputPortIndexInRange(int index, const char *action)
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.
static vtkExecutive * DefaultExecutivePrototype
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.
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.
friend class vtkGarbageCollector
Some classes need to clear the reference counts manually due to the way they work.
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
@ AllComponents
@ Requested
#define vtkDataArray
vtkTypeUInt32 vtkMTimeType
Definition vtkType.h:318
#define VTK_SIZEHINT(...)
#define VTK_UNBLOCKTHREADS
#define VTK_MARSHALMANUAL
#define vtkAlgorithm