29 #ifndef vtkAlgorithm_h
30 #define vtkAlgorithm_h
33 #include "vtkCommonExecutionModelModule.h"
37 VTK_ABI_NAMESPACE_BEGIN
39 class vtkAlgorithmInternals;
183 int GetNumberOfInputPorts();
188 int GetNumberOfOutputPorts();
200 void SetAbortExecuteAndUpdateTime();
216 vtkGetMacro(Progress,
double);
224 void UpdateProgress(
double amount);
239 this->ContainerAlgorithm = containerAlg;
252 vtkSetMacro(AbortOutput,
bool);
253 vtkGetMacro(AbortOutput,
bool);
254 vtkBooleanMacro(AbortOutput,
bool);
270 void SetProgressShiftScale(
double shift,
double scale);
271 vtkGetMacro(ProgressShift,
double);
272 vtkGetMacro(ProgressScale,
double);
283 void SetProgressText(
const char* ptext);
284 vtkGetStringMacro(ProgressText);
292 vtkGetMacro(ErrorCode,
unsigned long);
376 void SetInputArrayToProcess(
402 virtual void SetInputArrayToProcess(
403 int idx,
int port,
int connection,
int fieldAssociation,
const char*
name);
418 virtual void SetInputArrayToProcess(
419 int idx,
int port,
int connection,
int fieldAssociation,
const char*
name,
int component);
437 virtual void SetInputArrayToProcess(
438 int idx,
int port,
int connection,
int fieldAssociation,
int fieldAttributeType);
454 virtual void SetInputArrayToProcess(
455 int idx,
int port,
int connection,
int fieldAssociation,
int fieldAttributeType,
int component);
495 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
496 const char* fieldAssociation,
const char* attributeTypeorName);
497 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
498 const char* fieldAssociation,
const char* attributeTypeorName,
const char*
component);
504 int GetNumberOfInputArraySpecifications();
516 bool ResetInputArraySpecifications();
528 void RemoveAllInputs();
588 virtual void RemoveInputConnection(
int port,
int idx);
593 virtual void RemoveAllInputConnections(
int port);
626 int GetNumberOfInputConnections(
int port);
631 int GetTotalNumberOfInputConnections();
694 virtual bool Update(
int port);
696 virtual bool Update();
736 virtual int UpdatePiece(
737 int piece,
int numPieces,
int ghostLevels,
const int extents[6] =
nullptr);
745 virtual int UpdateExtent(
const int extents[6]);
754 virtual int UpdateTimeStep(
double time,
int piece = -1,
int numPieces = 1,
int ghostLevels = 0,
755 const int extents[6] =
nullptr);
761 virtual bool UpdateInformation();
766 virtual bool UpdateDataObject();
771 virtual void PropagateUpdateExtent();
777 virtual bool UpdateWholeExtent();
783 void ConvertTotalInputToPortConnection(
int ind,
int&
port,
int& conn);
797 void ReleaseDataFlagOn();
798 void ReleaseDataFlagOff();
818 static void SetDefaultExecutivePrototype(
vtkExecutive* proto);
830 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
832 void GetUpdateExtent(
int port,
int& x0,
int& x1,
int& y0,
int& y1,
int& z0,
int& z1);
834 void GetUpdateExtent(
int port,
int extent[6]);
844 int GetUpdatePiece(
int port);
846 int GetUpdateNumberOfPieces(
int port);
848 int GetUpdateGhostLevel(
int port);
876 void SetNoPriorTemporalAccessInformationKey(
int key);
877 void SetNoPriorTemporalAccessInformationKey();
884 void RemoveNoPriorTemporalAccessInformationKey();
908 bool CheckUpstreamAbort();
927 virtual void SetNumberOfInputPorts(
int n);
932 virtual void SetNumberOfOutputPorts(
int n);
935 int InputPortIndexInRange(
int index,
const char* action);
936 int OutputPortIndexInRange(
int index,
const char* action);
976 int GetInputArrayComponent(
int idx);
1066 template <
typename ArrayType,
typename... Params>
1069 auto abstractArray = this->GetInputArray(std::forward<Params>(params)...);
1070 auto* castArray = ArrayType::SafeDownCast(abstractArray.GetPointer());
1098 vtkSetMacro(ErrorCode,
unsigned long);
1125 virtual void SetNumberOfInputConnections(
int port,
int n);
1137 this->SetInputDataObject(port, input);
1141 this->AddInputDataObject(port, input);
1150 vtkAlgorithmInternals* AlgorithmInternal;
1151 static void ConnectionAdd(
1153 static void ConnectionRemove(
1161 double ProgressShift;
1162 double ProgressScale;
1167 VTK_ABI_NAMESPACE_END
vtkAlgorithmOutput * GetOutputPort()
vtkAlgorithm * GetContainerAlgorithm()
Set/get a Container algorithm for this algorithm.
abstract base class for most VTK objects
DesiredOutputPrecision
Values used for setting the desired output precision for various algorithms.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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. ...
vtkTypeUInt32 vtkMTimeType
static vtkTimeStamp LastAbortTime
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
Abstract superclass for all arrays.
record modification and/or execution time
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
#define VTK_UNBLOCKTHREADS
vtkInformation * GetInputInformation()
Equivalent to GetInputInformation(0, 0)
virtual void AddInputDataObject(vtkDataObject *data)
Superclass for all pipeline executives in VTK.
void SetInputDataInternal(int port, vtkDataObject *input)
These methods are used by subclasses to implement methods to set data objects directly as input...
Detect and break reference loops.
Proxy object to connect input/output ports.
void AddInputDataInternal(int port, vtkDataObject *input)
Superclass for all sources, filters, and sinks in VTK.
vtkInformation * Information
#define VTK_MARSHALMANUAL
a simple class to control print indentation
virtual void ReportReferences(vtkGarbageCollector *)
int GetUpdateNumberOfPieces()
These functions return the update extent for output ports that use piece extents. ...
abstract superclass for arrays of numeric data
#define VTK_SIZEHINT(...)
void SetContainerAlgorithm(vtkAlgorithm *containerAlg)
Set/get a Container algorithm for this algorithm.
virtual void SetInputDataObject(vtkDataObject *data)
unsigned long ErrorCode
The error code contains a possible error that occurred while reading or writing the file...
create and manipulate ordered lists of objects
int GetUpdateGhostLevel()
These functions return the update extent for output ports that use piece extents. ...
vtkTimeStamp LastAbortCheckTime
bool UsesGarbageCollector() const override
Participate in garbage collection.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
vtkProgressObserver * ProgressObserver
general representation of visualization data
vtkExecutive * GetInputExecutive()
Equivalent to GetInputExecutive(0, 0)
vtkSmartPointer< ArrayType > GetInputArrayAs(Params &&...params)
Get an array from the input at index idx.
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.
Basic class to optionally replace vtkAlgorithm progress functionality.
static vtkExecutive * DefaultExecutivePrototype
std::atomic< vtkTypeBool > AbortExecute