32 #ifndef vtkAlgorithm_h
33 #define vtkAlgorithm_h
35 #include "vtkCommonExecutionModelModule.h"
36 #include "vtkObject.h"
38 class vtkAbstractArray;
39 class vtkAlgorithmInternals;
40 class vtkAlgorithmOutput;
46 class vtkInformationInformationVectorKey;
47 class vtkInformationIntegerKey;
48 class vtkInformationStringKey;
49 class vtkInformationStringVectorKey;
50 class vtkInformationVector;
51 class vtkProgressObserver;
58 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
123 vtkInformationVector** inInfo,
124 vtkInformationVector* outInfo);
131 vtkCollection* inInfo,
132 vtkInformationVector* outInfo);
141 vtkInformationVector** inInfoVec,
142 vtkInformationVector* outInfoVec,
143 int requestFromOutputPort,
144 vtkMTimeType* mtime);
175 vtkGetObjectMacro(Information, vtkInformation);
176 virtual void SetInformation(vtkInformation*);
202 vtkSetMacro(AbortExecute,
int);
203 vtkGetMacro(AbortExecute,
int);
204 vtkBooleanMacro(AbortExecute,
int);
211 vtkSetClampMacro(Progress,
double,0.0,1.0);
212 vtkGetMacro(Progress,
double);
231 vtkGetStringMacro(ProgressText);
239 vtkGetMacro( ErrorCode,
unsigned long );
253 static vtkInformationIntegerKey* INPUT_IS_REPEATABLE();
257 static vtkInformationInformationVectorKey* INPUT_REQUIRED_FIELDS();
261 static vtkInformationStringVectorKey* INPUT_REQUIRED_DATA_TYPE();
265 static vtkInformationInformationVectorKey* INPUT_ARRAYS_TO_PROCESS();
269 static vtkInformationIntegerKey* INPUT_PORT();
273 static vtkInformationIntegerKey* INPUT_CONNECTION();
310 int fieldAssociation,
312 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
313 int fieldAssociation,
314 int fieldAttributeType);
315 virtual void SetInputArrayToProcess(
int idx, vtkInformation *info);
342 const char* fieldAssociation,
343 const char* attributeTypeorName);
387 virtual void SetInputConnection(vtkAlgorithmOutput* input);
401 virtual void AddInputConnection(vtkAlgorithmOutput* input);
434 virtual void SetInputDataObject(vtkDataObject* data)
435 { this->SetInputDataObject(0, data); }
443 virtual void AddInputDataObject(vtkDataObject* data)
444 { this->AddInputDataObject(0, data); }
453 vtkAlgorithmOutput* GetOutputPort() {
454 return this->GetOutputPort(0); }
487 return this->GetInputAlgorithm(0, 0);
501 return this->GetInputExecutive(0, 0);
519 return this->GetInputInformation(0, 0);
536 virtual void Update();
561 virtual int Update(
int port, vtkInformationVector* requests);
568 virtual int Update(vtkInformation* requests);
577 int piece,
int numPieces,
int ghostLevels,
const int extents[6]=0);
593 int piece=-1,
int numPieces=1,
int ghostLevels=0,
const int extents[6]=0);
632 virtual int GetReleaseDataFlag();
633 void ReleaseDataFlagOn();
634 void ReleaseDataFlagOff();
647 int UpdateExtentIsEmpty(vtkInformation *pinfo,
int extentType);
673 VTK_LEGACY(
void SetUpdateExtent(
int port,
674 int piece,
int numPieces,
int ghostLevel));
680 VTK_LEGACY(
void SetUpdateExtent(
681 int piece,
int numPieces,
int ghostLevel));
701 return this->GetUpdateExtent(0);
703 int* GetUpdateExtent(
int port);
704 void GetUpdateExtent(
int& x0,
int& x1,
int& y0,
int& y1,
707 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
709 void GetUpdateExtent(
int port,
710 int& x0,
int& x1,
int& y0,
int& y1,
712 void GetUpdateExtent(
int extent[6])
714 this->GetUpdateExtent(0, extent);
716 void GetUpdateExtent(
int port,
int extent[6]);
727 return this->GetUpdatePiece(0);
729 int GetUpdatePiece(
int port);
730 int GetUpdateNumberOfPieces()
732 return this->GetUpdateNumberOfPieces(0);
734 int GetUpdateNumberOfPieces(
int port);
735 int GetUpdateGhostLevel()
737 return this->GetUpdateGhostLevel(0);
739 int GetUpdateGhostLevel(
int port);
753 vtkGetObjectMacro(ProgressObserver, vtkProgressObserver);
762 static vtkInformationIntegerKey* PORT_REQUIREMENTS_FILLED();
765 vtkInformation* Information;
772 virtual
int FillInputPortInformation(
int port, vtkInformation* info);
779 virtual
int FillOutputPortInformation(
int port, vtkInformation* info);
784 virtual
void SetNumberOfInputPorts(
int n);
789 virtual
void SetNumberOfOutputPorts(
int n);
792 int InputPortIndexInRange(
int index, const
char* action);
793 int OutputPortIndexInRange(
int index, const
char* action);
799 int GetInputArrayAssociation(
int idx, vtkInformationVector **inputVector);
810 int GetInputArrayAssociation(
int idx,
int connection,
811 vtkInformationVector **inputVector);
812 int GetInputArrayAssociation(
int idx, vtkDataObject* input);
821 vtkDataArray *GetInputArrayToProcess(
int idx,vtkInformationVector **inputVector);
822 vtkDataArray *GetInputArrayToProcess(
int idx,
823 vtkInformationVector **inputVector,
836 vtkDataArray *GetInputArrayToProcess(
int idx,
838 vtkInformationVector **inputVector);
839 vtkDataArray *GetInputArrayToProcess(
int idx,
841 vtkInformationVector **inputVector,
843 vtkDataArray *GetInputArrayToProcess(
int idx,
844 vtkDataObject* input);
845 vtkDataArray *GetInputArrayToProcess(
int idx,
846 vtkDataObject* input,
856 vtkAbstractArray *GetInputAbstractArrayToProcess(
int idx,vtkInformationVector **inputVector);
857 vtkAbstractArray *GetInputAbstractArrayToProcess
858 (
int idx, vtkInformationVector **inputVector,
int& association);
870 vtkAbstractArray *GetInputAbstractArrayToProcess(
int idx,
872 vtkInformationVector **inputVector);
873 vtkAbstractArray *GetInputAbstractArrayToProcess(
int idx,
875 vtkInformationVector **inputVector,
877 vtkAbstractArray *GetInputAbstractArrayToProcess(
int idx,
878 vtkDataObject* input);
879 vtkAbstractArray *GetInputAbstractArrayToProcess(
int idx,
880 vtkDataObject* input,
893 vtkInformation *GetInputArrayFieldInformation(
int idx,
894 vtkInformationVector **inputVector);
903 virtual vtkExecutive* CreateDefaultExecutive();
910 vtkSetMacro( ErrorCode,
unsigned long );
911 unsigned long ErrorCode;
919 void ReportReferences(vtkGarbageCollector*) VTK_OVERRIDE;
929 virtual
void SetNthInputConnection(
int port,
int index,
930 vtkAlgorithmOutput* input);
938 virtual
void SetNumberOfInputConnections(
int port,
int n);
940 static vtkExecutive* DefaultExecutivePrototype;
948 void SetInputDataInternal(
int port, vtkDataObject *input)
949 { this->SetInputDataObject(port, input); }
950 void AddInputDataInternal(
int port, vtkDataObject *input)
951 { this->AddInputDataObject(port, input); }
953 vtkProgressObserver* ProgressObserver;
956 vtkExecutive* Executive;
957 vtkInformationVector* InputPortInformation;
958 vtkInformationVector* OutputPortInformation;
959 vtkAlgorithmInternals* AlgorithmInternal;
960 static void ConnectionAdd(
vtkAlgorithm* producer,
int producerPort,
962 static void ConnectionRemove(
vtkAlgorithm* producer,
int producerPort,
964 static void ConnectionRemoveAllInput(
vtkAlgorithm* consumer,
int port);
965 static void ConnectionRemoveAllOutput(
vtkAlgorithm* producer,
int port);
969 void operator=(
const vtkAlgorithm&) VTK_DELETE_FUNCTION;
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:54
virtual void UpdateDataObject()
void UpdateProgress(double amount)
vtkDataObject * GetInputDataObject(int port, int connection)
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput *input)
void Register(vtkObjectBase *o) VTK_OVERRIDE
void SetUpdateExtent(int extent[6])
int UpdateExtentIsEmpty(vtkInformation *pinfo, vtkDataObject *output)
int GetUpdatePiece()
Definition: vtkAlgorithm.h:725
vtkExecutive * GetInputExecutive()
Definition: vtkAlgorithm.h:499
int SetUpdateExtentToWholeExtent(int port)
static vtkInformationIntegerKey * INPUT_IS_OPTIONAL()
virtual void RemoveAllInputConnections(int port)
virtual int ComputePipelineMTime(vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
void UnRegister(vtkObjectBase *o) VTK_OVERRIDE
vtkAlgorithmOutput * GetInputConnection(int port, int index)
vtkInformation * GetOutputPortInformation(int port)
virtual int Update(int port, vtkInformationVector *requests)
virtual void SetInputArrayToProcess(int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
int GetNumberOfOutputPorts()
virtual int ModifyRequest(vtkInformation *request, int when)
int GetNumberOfInputPorts()
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkDataObject * GetOutputDataObject(int port)
vtkAlgorithm * GetInputAlgorithm(int port, int index)
vtkInformation * GetInputInformation()
Definition: vtkAlgorithm.h:517
virtual int UpdateTimeStep(double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
virtual int UpdatePiece(int piece, int numPieces, int ghostLevels, const int extents[6]=0)
vtkAlgorithm * GetInputAlgorithm()
Definition: vtkAlgorithm.h:485
virtual void SetInputArrayToProcess(int idx, int port, int connection, int fieldAssociation, const char *name)
virtual void AddInputDataObject(int port, vtkDataObject *data)
vtkExecutive * GetInputExecutive(int port, int index)
static void SetDefaultExecutivePrototype(vtkExecutive *proto)
virtual int Update(vtkInformation *requests)
vtkExecutive * GetExecutive()
int SetUpdateExtentToWholeExtent()
void SetUpdateExtent(int port, int extent[6])
vtkAlgorithm * GetInputAlgorithm(int port, int index, int &algPort)
virtual int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
void SetProgressObserver(vtkProgressObserver *)
virtual void UpdateWholeExtent()
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
int GetTotalNumberOfInputConnections()
void ConvertTotalInputToPortConnection(int ind, int &port, int &conn)
virtual void SetExecutive(vtkExecutive *executive)
int GetNumberOfInputConnections(int port)
void SetProgressText(const char *ptext)
virtual void PropagateUpdateExtent()
virtual void Update(int port)
virtual int UpdateExtent(const int extents[6])
vtkInformation * GetInputPortInformation(int port)
DesiredOutputPrecision
Definition: vtkAlgorithm.h:74
virtual void SetReleaseDataFlag(int)
virtual void SetInputDataObject(int port, vtkDataObject *data)
vtkInformation * GetInputArrayInformation(int idx)
static vtkInformationIntegerKey * CAN_HANDLE_PIECE_REQUEST()
virtual void RemoveInputConnection(int port, int idx)
static vtkInformationIntegerKey * CAN_PRODUCE_SUB_EXTENT()
int ProcessRequest(vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
vtkAlgorithmOutput * GetOutputPort(int index)
int * GetUpdateExtent()
Definition: vtkAlgorithm.h:699
vtkInformation * GetOutputInformation(int port)
virtual void UpdateInformation()
vtkInformation * GetInputInformation(int port, int index)
virtual void AddInputConnection(int port, vtkAlgorithmOutput *input)
abstract base class for most VTK objects
Definition: vtkObjectBase.h:63
abstract base class for most VTK objects
Definition: vtkObject.h:54