41 #ifndef vtkAlgorithm_h
42 #define vtkAlgorithm_h
44 #include "vtkCommonExecutionModelModule.h"
49 class vtkAlgorithmInternals;
222 vtkGetMacro(Progress,
double);
230 void SetProgress(
double);
237 void UpdateProgress(
double amount);
252 void SetProgressShiftScale(
double shift,
double scale);
253 vtkGetMacro(ProgressShift,
double);
254 vtkGetMacro(ProgressScale,
double);
265 void SetProgressText(const
char* ptext);
266 vtkGetStringMacro(ProgressText);
274 vtkGetMacro(ErrorCode,
unsigned long);
343 virtual
void SetInputArrayToProcess(
344 int idx,
int port,
int connection,
int fieldAssociation, const
char*
name);
345 virtual
void SetInputArrayToProcess(
346 int idx,
int port,
int connection,
int fieldAssociation,
int fieldAttributeType);
373 virtual
void SetInputArrayToProcess(
int idx,
int port,
int connection,
374 const
char* fieldAssociation, const
char* attributeTypeorName);
386 void RemoveAllInputs();
446 virtual
void RemoveInputConnection(
int port,
int idx);
451 virtual
void RemoveAllInputConnections(
int port);
593 int piece,
int numPieces,
int ghostLevels,
const int extents[6] =
nullptr);
609 const int extents[6] =
nullptr);
682 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
850 vtkSetMacro(ErrorCode,
unsigned long);
889 this->SetInputDataObject(
port, input);
893 this->AddInputDataObject(
port, input);
902 vtkAlgorithmInternals* AlgorithmInternal;
903 static void ConnectionAdd(
905 static void ConnectionRemove(
914 double ProgressShift;
915 double ProgressScale;
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).
int GetUpdatePiece(int port)
These functions return the update extent for output ports that use piece extents.
static vtkAlgorithm * New()
int GetInputArrayAssociation(int idx, vtkInformationVector **inputVector)
Get the assocition of the actual data array for the input array specified by idx, this is only reason...
virtual void SetNumberOfOutputPorts(int n)
Set the number of output ports provided by the algorithm.
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.
static vtkInformationIntegerKey * PORT_REQUIREMENTS_FILLED()
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.
int GetInputArrayAssociation(int idx, vtkDataObject *input)
Filters that have multiple connections on one port can use this signature.
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...
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.
vtkInformation * Information
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkDataObject *input, int &association)
Filters that have multiple connections on one port can use this signature.
vtkExecutive * GetInputExecutive()
Equivalent to GetInputExecutive(0, 0)
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.
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.
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 vtkTypeBool Update(int port, vtkInformationVector *requests)
This method enables the passing of data requests to the algorithm to be used during execution (in add...
vtkAlgorithmOutput * GetInputConnection(int port, int index)
Get the algorithm output port connected to an input port.
int * GetUpdateExtent(int port)
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 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 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.
void UnRegister(vtkObjectBase *o) override
Participate in garbage collection.
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.
vtkAlgorithm * GetInputAlgorithm(int port, int index)
Returns the algorithm connected to a port-index pair.
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0)
void ReleaseDataFlagOn()
Turn release data flag on or off for all output ports.
vtkDataArray * GetInputArrayToProcess(int idx, int connection, vtkInformationVector **inputVector)
Filters that have multiple connections on one port can use this signature.
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(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.
int GetUpdateGhostLevel(int port)
These functions return the update extent for output ports that use piece extents.
virtual void AddInputDataObject(int port, vtkDataObject *data)
Add the data-object as an input to this given port.
vtkExecutive * GetInputExecutive(int port, int index)
Returns the executive associated with a particular input connection.
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...
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, int connection, vtkInformationVector **inputVector)
Filters that have multiple connections on one port can use this signature.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, vtkDataObject *input)
Filters that have multiple connections on one port can use this signature.
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...
vtkDataArray * GetInputArrayToProcess(int idx, vtkDataObject *input)
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...
void ReportReferences(vtkGarbageCollector *) override
vtkExecutive * GetExecutive()
Get this algorithm's executive.
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.
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 SetProgressObserver(vtkProgressObserver *)
If an ProgressObserver is set, the algorithm will report progress through it rather than directly.
vtkDataArray * GetInputArrayToProcess(int idx, vtkDataObject *input, int &association)
Filters that have multiple connections on one port can use this signature.
virtual int FillInputPortInformation(int port, vtkInformation *info)
Fill the input port information objects for this algorithm.
virtual void UpdateWholeExtent()
Bring this algorithm's outputs up-to-date.
vtkDataArray * GetInputArrayToProcess(int idx, int connection, vtkInformationVector **inputVector, int &association)
Filters that have multiple connections on one port can use this signature.
virtual void SetNumberOfInputConnections(int port, int n)
Set the number of input connections on the given input port.
int GetTotalNumberOfInputConnections()
Get the total number of inputs for this algorithm.
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.
int GetNumberOfInputConnections(int port)
Get the number of inputs currently connected to a port.
vtkInformation * GetInputArrayFieldInformation(int idx, vtkInformationVector **inputVector)
This method takes in an index (as specified in SetInputArrayToProcess) and a pipeline information vec...
virtual void PropagateUpdateExtent()
Propagate meta-data upstream.
virtual void Update(int port)
Bring this algorithm's outputs up-to-date.
virtual int UpdateExtent(const int extents[6])
Convenience method to update an algorithm after passing requests to its first output port.
void Register(vtkObjectBase *o) override
Participate in garbage collection.
vtkAlgorithmOutput * GetOutputPort()
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.
vtkInformation * GetInputPortInformation(int port)
Get the information object associated with an input port.
DesiredOutputPrecision
Values used for setting the desired output precision for various algorithms.
virtual void SetReleaseDataFlag(int)
Turn release data flag on or off for all output ports.
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.
vtkAbstractArray * GetInputAbstractArrayToProcess(int idx, int connection, vtkInformationVector **inputVector, int &association)
Filters that have multiple connections on one port can use this signature.
virtual void SetNumberOfInputPorts(int n)
Set the number of input ports used by the algorithm.
int HasExecutive()
Check whether this algorithm has an assigned executive.
vtkAlgorithmOutput * GetOutputPort(int index)
Get a proxy object corresponding to the given output port of this algorithm.
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
vtkInformation * GetOutputInformation(int port)
Return the information object that is associated with a particular output port.
vtkProgressObserver * ProgressObserver
virtual int GetReleaseDataFlag()
Turn release data flag on or off for all output ports.
virtual void UpdateInformation()
Bring the algorithm's information up-to-date.
void AddInputDataInternal(int port, vtkDataObject *input)
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual vtkExecutive * CreateDefaultExecutive()
Create a default executive.
int GetUpdateNumberOfPieces(int port)
These functions return the update extent for output ports that use piece extents.
int InputPortIndexInRange(int index, const char *action)
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.
static vtkExecutive * DefaultExecutivePrototype
create and manipulate ordered lists of objects
abstract superclass for arrays of numeric data
general representation of visualization data
Superclass for all pipeline executives in VTK.
Detect and break reference loops.
a simple class to control print indentation
abstract base class for most VTK objects
abstract base class for most VTK objects
Basic class to optionally replace vtkAlgorithm progress functionality.
#define VTK_DEPRECATED_IN_9_0_0(reason)
vtkTypeUInt32 vtkMTimeType
#define VTK_SIZEHINT(...)