38 #ifndef vtkAlgorithm_h
39 #define vtkAlgorithm_h
41 #include "vtkCommonExecutionModelModule.h"
45 class vtkAlgorithmInternals;
149 int requestFromOutputPort,
209 vtkGetMacro(AbortExecute,
int);
217 vtkSetClampMacro(Progress,
double,0.0,1.0);
218 vtkGetMacro(Progress,
double);
245 vtkGetMacro( ErrorCode,
unsigned long );
316 int fieldAssociation,
319 int fieldAssociation,
320 int fieldAttributeType);
348 const char* fieldAssociation,
349 const char* attributeTypeorName);
441 { this->SetInputDataObject(0,
data); }
450 { this->AddInputDataObject(0,
data); }
460 return this->GetOutputPort(0); }
493 return this->GetInputAlgorithm(0, 0);
507 return this->GetInputExecutive(0, 0);
525 return this->GetInputInformation(0, 0);
583 int piece,
int numPieces,
int ghostLevels,
const int extents[6]=0);
599 int piece=-1,
int numPieces=1,
int ghostLevels=0,
const int extents[6]=0);
679 VTK_LEGACY(
void SetUpdateExtent(
int port,
680 int piece,
int numPieces,
int ghostLevel));
686 VTK_LEGACY(
void SetUpdateExtent(
687 int piece,
int numPieces,
int ghostLevel));
707 return this->GetUpdateExtent(0);
713 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
716 int& x0,
int& x1,
int& y0,
int& y1,
720 this->GetUpdateExtent(0,
extent);
733 return this->GetUpdatePiece(0);
738 return this->GetUpdateNumberOfPieces(0);
743 return this->GetUpdateGhostLevel(0);
790 virtual
void SetNumberOfInputPorts(
int n);
795 virtual
void SetNumberOfOutputPorts(
int n);
798 int InputPortIndexInRange(
int index, const
char* action);
799 int OutputPortIndexInRange(
int index, const
char* action);
816 int GetInputArrayAssociation(
int idx,
int connection,
917 unsigned long ErrorCode;
944 virtual
void SetNumberOfInputConnections(
int port,
int n);
955 { this->SetInputDataObject(
port, input); }
957 { this->AddInputDataObject(
port, input); }
965 vtkAlgorithmInternals* AlgorithmInternal;
966 static void ConnectionAdd(
vtkAlgorithm* producer,
int producerPort,
968 static void ConnectionRemove(
vtkAlgorithm* producer,
int producerPort,
975 void operator=(
const vtkAlgorithm&) VTK_DELETE_FUNCTION;
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)
void UpdateProgress(double amount)
Update the progress of the process object.
static vtkAlgorithm * New()
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 RemoveInputConnection(int port, vtkAlgorithmOutput *input)
Remove a connection from the given input port index.
int GetUpdateGhostLevel()
void GetUpdateExtent(int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
virtual void AddInputDataObject(vtkDataObject *data)
virtual void SetInputDataObject(vtkDataObject *data)
int UpdateExtentIsEmpty(vtkInformation *pinfo, int extentType)
void SetUpdateExtent(int extent[6])
Convenience function equivalent to SetUpdateExtent(0, extent)
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])
int GetUpdatePiece()
These functions return the update extent for output ports that use piece extents.
vtkExecutive * GetInputExecutive()
Equivalent to GetInputExecutive(0, 0)
int SetUpdateExtentToWholeExtent(int port)
If the whole output extent is required, this method can be called to set the output update extent to ...
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)
vtkAlgorithmOutput * GetInputConnection(int port, int index)
Get the algorithm output port connected to an input port.
int * GetUpdateExtent(int port)
vtkInformation * GetOutputPortInformation(int port)
Get the information object associated with an output port.
virtual int Update(int port, vtkInformationVector *requests)
This method enables the passing of data requests to the algorithm to be used during execution (in add...
virtual void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
String based versions of SetInputArrayToProcess().
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()
void UnRegister(vtkObjectBase *o) override
Decrease the reference count (release by another object).
int GetNumberOfInputPorts()
Get the number of input ports used by the algorithm.
vtkDataObject * GetOutputDataObject(int port)
Get the data object that will contain the algorithm output for the given port.
vtkAlgorithm * GetInputAlgorithm(int port, int index)
Returns the algorithm connected to a port-index pair.
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0)
virtual int UpdateTimeStep(double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
Convenience method to update an algorithm after passing requests to its first output port.
virtual int UpdatePiece(int piece, int numPieces, int ghostLevels, const int extents[6]=0)
Convenience method to update an algorithm after passing requests to its first output port.
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
void GetUpdateExtent(int port, int extent[6])
int GetUpdateGhostLevel(int port)
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 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.
static void SetDefaultExecutivePrototype(vtkExecutive *proto)
If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using Ne...
virtual int Update(vtkInformation *requests)
Convenience method to update an algorithm after passing requests to its first output port.
vtkExecutive * GetExecutive()
Get this algorithm's executive.
int SetUpdateExtentToWholeExtent()
Convenience function equivalent to SetUpdateExtentToWholeExtent(0) This method assumes that the whole...
void SetUpdateExtent(int port, int extent[6])
Set the output update extent for data objects that use 3D extents.
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.
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
Upstream/Downstream requests form the generalized interface through which executives invoke a algorit...
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)
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)
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.
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.
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()
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.
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)
vtkInformation * GetInputArrayInformation(int idx)
Get the info object for the specified input array to this algorithm.
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)
int ProcessRequest(vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
Version of ProcessRequest() that is wrapped.
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()
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.
int GetUpdateNumberOfPieces(int port)
vtkInformation * GetInputInformation(int port, int index)
Return the information object that is associated with a particular input connection.
virtual void SetInformation(vtkInformation *)
virtual void AddInputConnection(int port, vtkAlgorithmOutput *input)
Add a connection to the given input port index.
void RemoveAllInputs()
Remove all the input data.
create and manipulate unsorted 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.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkTypeUInt64 vtkMTimeType