32 #ifndef vtkAlgorithm_h 33 #define vtkAlgorithm_h 35 #include "vtkCommonExecutionModelModule.h" 39 class vtkAlgorithmInternals;
144 int requestFromOutputPort,
183 int GetNumberOfInputPorts();
188 int GetNumberOfOutputPorts();
212 vtkSetClampMacro(Progress,
double,0.0,1.0);
213 vtkGetMacro(Progress,
double);
221 void UpdateProgress(
double amount);
231 void SetProgressText(
const char* ptext);
232 vtkGetStringMacro(ProgressText);
240 vtkGetMacro( ErrorCode,
unsigned long );
310 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
311 int fieldAssociation,
313 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
314 int fieldAssociation,
315 int fieldAttributeType);
342 virtual void SetInputArrayToProcess(
int idx,
int port,
int connection,
343 const char* fieldAssociation,
344 const char* attributeTypeorName);
358 void RemoveAllInputs();
419 virtual void RemoveInputConnection(
int port,
int idx);
424 virtual void RemoveAllInputConnections(
int port);
436 { this->SetInputDataObject(0,
data); }
445 { this->AddInputDataObject(0,
data); }
455 return this->GetOutputPort(0); }
460 int GetNumberOfInputConnections(
int port);
465 int GetTotalNumberOfInputConnections();
488 return this->GetInputAlgorithm(0, 0);
502 return this->GetInputExecutive(0, 0);
520 return this->GetInputInformation(0, 0);
536 virtual void Update(
int port);
537 virtual void Update();
577 virtual int UpdatePiece(
578 int piece,
int numPieces,
int ghostLevels,
const int extents[6]=
nullptr);
585 virtual int UpdateExtent(
const int extents[6]);
593 virtual int UpdateTimeStep(
double time,
594 int piece=-1,
int numPieces=1,
int ghostLevels=0,
const int extents[6]=
nullptr);
599 virtual void UpdateInformation();
604 virtual void UpdateDataObject();
609 virtual void PropagateUpdateExtent();
614 virtual void UpdateWholeExtent();
620 void ConvertTotalInputToPortConnection(
int ind,
int&
port,
int& conn);
632 virtual void SetReleaseDataFlag(
int);
633 virtual int GetReleaseDataFlag();
634 void ReleaseDataFlagOn();
635 void ReleaseDataFlagOff();
655 static void SetDefaultExecutivePrototype(
vtkExecutive* proto);
665 return this->GetUpdateExtent(0);
671 this->GetUpdateExtent(0, x0, x1, y0, y1, z0, z1);
673 void GetUpdateExtent(
int port,
674 int& x0,
int& x1,
int& y0,
int& y1,
678 this->GetUpdateExtent(0,
extent);
680 void GetUpdateExtent(
int port,
int extent[6]);
691 return this->GetUpdatePiece(0);
693 int GetUpdatePiece(
int port);
696 return this->GetUpdateNumberOfPieces(0);
698 int GetUpdateNumberOfPieces(
int port);
701 return this->GetUpdateGhostLevel(0);
703 int GetUpdateGhostLevel(
int port);
748 virtual void SetNumberOfInputPorts(
int n);
753 virtual void SetNumberOfOutputPorts(
int n);
756 int InputPortIndexInRange(
int index,
const char* action);
757 int OutputPortIndexInRange(
int index,
const char* action);
774 int GetInputArrayAssociation(
int idx,
int connection,
874 vtkSetMacro( ErrorCode,
unsigned long );
893 virtual void SetNthInputConnection(
int port,
int index,
902 virtual void SetNumberOfInputConnections(
int port,
int n);
913 { this->SetInputDataObject(
port, input); }
915 { this->AddInputDataObject(
port, input); }
923 vtkAlgorithmInternals* AlgorithmInternal;
924 static void ConnectionAdd(
vtkAlgorithm* producer,
int producerPort,
926 static void ConnectionRemove(
vtkAlgorithm* producer,
int producerPort,
vtkAlgorithmOutput * GetOutputPort()
abstract base class for most VTK objects
DesiredOutputPrecision
Values used for setting the desired output precision for various algorithms.
virtual void Register(vtkObjectBase *o)
Increase the reference count (mark as used by another object).
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
int * GetUpdateExtent()
These functions return the update extent for output ports that use 3D extents.
Abstract superclass for all arrays.
vtkAlgorithm * GetInputAlgorithm()
Equivalent to GetInputAlgorithm(0, 0).
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
virtual void UnRegister(vtkObjectBase *o)
Decrease the reference count (release by another object).
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
abstract base class for most VTK objects
#define VTK_SIZEHINT(...)
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.
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)
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