vtk-dicom  0.8.17
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vtkAlgorithm Class Reference

Superclass for all sources, filters, and sinks in VTK. More...

#include <vtkAlgorithm.h>

Inheritance diagram for vtkAlgorithm:
Inheritance graph
[legend]
Collaboration diagram for vtkAlgorithm:
Collaboration graph
[legend]

Public Types

enum  DesiredOutputPrecision { SINGLE_PRECISION , DOUBLE_PRECISION , DEFAULT_PRECISION }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 
vtkAlgorithmNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
int HasExecutive ()
 
vtkExecutive * GetExecutive ()
 
virtual void SetExecutive (vtkExecutive *executive)
 
virtual int ProcessRequest (vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo)
 
int ProcessRequest (vtkInformation *request, vtkCollection *inInfo, vtkInformationVector *outInfo)
 
virtual int ComputePipelineMTime (vtkInformation *request, vtkInformationVector **inInfoVec, vtkInformationVector *outInfoVec, int requestFromOutputPort, vtkMTimeType *mtime)
 
virtual int ModifyRequest (vtkInformation *request, int when)
 
vtkInformation * GetInputPortInformation (int port)
 
vtkInformation * GetOutputPortInformation (int port)
 
virtual vtkInformation * GetInformation ()
 
virtual void SetInformation (vtkInformation *)
 
int GetNumberOfInputPorts ()
 
int GetNumberOfOutputPorts ()
 
void Register (vtkObjectBase *o) VTK_OVERRIDE
 
void UnRegister (vtkObjectBase *o) VTK_OVERRIDE
 
virtual void SetAbortExecute (int)
 
virtual int GetAbortExecute ()
 
virtual void AbortExecuteOn ()
 
virtual void AbortExecuteOff ()
 
virtual void SetProgress (double)
 
virtual double GetProgress ()
 
void UpdateProgress (double amount)
 
void SetProgressText (const char *ptext)
 
virtual char * GetProgressText ()
 
virtual unsigned long GetErrorCode ()
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, const char *name)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, int fieldAssociation, int fieldAttributeType)
 
virtual void SetInputArrayToProcess (int idx, vtkInformation *info)
 
virtual void SetInputArrayToProcess (int idx, int port, int connection, const char *fieldAssociation, const char *attributeTypeorName)
 
vtkInformation * GetInputArrayInformation (int idx)
 
void RemoveAllInputs ()
 
vtkDataObject * GetOutputDataObject (int port)
 
vtkDataObject * GetInputDataObject (int port, int connection)
 
virtual void SetInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void SetInputConnection (vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void AddInputConnection (vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, vtkAlgorithmOutput *input)
 
virtual void RemoveInputConnection (int port, int idx)
 
virtual void RemoveAllInputConnections (int port)
 
virtual void SetInputDataObject (int port, vtkDataObject *data)
 
virtual void SetInputDataObject (vtkDataObject *data)
 
virtual void AddInputDataObject (int port, vtkDataObject *data)
 
virtual void AddInputDataObject (vtkDataObject *data)
 
vtkAlgorithmOutput * GetOutputPort (int index)
 
vtkAlgorithmOutput * GetOutputPort ()
 
int GetNumberOfInputConnections (int port)
 
int GetTotalNumberOfInputConnections ()
 
vtkAlgorithmOutput * GetInputConnection (int port, int index)
 
vtkAlgorithmGetInputAlgorithm (int port, int index, int &algPort)
 
vtkAlgorithmGetInputAlgorithm (int port, int index)
 
vtkAlgorithmGetInputAlgorithm ()
 
vtkExecutive * GetInputExecutive (int port, int index)
 
vtkExecutive * GetInputExecutive ()
 
vtkInformation * GetInputInformation (int port, int index)
 
vtkInformation * GetInputInformation ()
 
vtkInformation * GetOutputInformation (int port)
 
virtual void Update (int port)
 
virtual void Update ()
 
virtual int Update (int port, vtkInformationVector *requests)
 
virtual int Update (vtkInformation *requests)
 
virtual int UpdatePiece (int piece, int numPieces, int ghostLevels, const int extents[6]=0)
 
virtual int UpdateExtent (const int extents[6])
 
virtual int UpdateTimeStep (double time, int piece=-1, int numPieces=1, int ghostLevels=0, const int extents[6]=0)
 
virtual void UpdateInformation ()
 
virtual void UpdateDataObject ()
 
virtual void PropagateUpdateExtent ()
 
virtual void UpdateWholeExtent ()
 
void ConvertTotalInputToPortConnection (int ind, int &port, int &conn)
 
virtual void SetReleaseDataFlag (int)
 
virtual int GetReleaseDataFlag ()
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, vtkDataObject *output)
 
int UpdateExtentIsEmpty (vtkInformation *pinfo, int extentType)
 
int SetUpdateExtentToWholeExtent (int port)
 
int SetUpdateExtentToWholeExtent ()
 
void SetUpdateExtent (int port, int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int piece, int numPieces, int ghostLevel)
 
void SetUpdateExtent (int port, int extent[6])
 
void SetUpdateExtent (int extent[6])
 
int * GetUpdateExtent ()
 
int * GetUpdateExtent (int port)
 
void GetUpdateExtent (int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int port, int &x0, int &x1, int &y0, int &y1, int &z0, int &z1)
 
void GetUpdateExtent (int extent[6])
 
void GetUpdateExtent (int port, int extent[6])
 
int GetUpdatePiece ()
 
int GetUpdatePiece (int port)
 
int GetUpdateNumberOfPieces ()
 
int GetUpdateNumberOfPieces (int port)
 
int GetUpdateGhostLevel ()
 
int GetUpdateGhostLevel (int port)
 
void SetProgressObserver (vtkProgressObserver *)
 
virtual vtkProgressObserver * GetProgressObserver ()
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual vtkMTimeType GetMTime ()
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommand * GetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 

Static Public Member Functions

static vtkAlgorithmNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkAlgorithmSafeDownCast (vtkObjectBase *o)
 
static vtkInformationIntegerKey * INPUT_IS_OPTIONAL ()
 
static vtkInformationIntegerKey * INPUT_IS_REPEATABLE ()
 
static vtkInformationInformationVectorKey * INPUT_REQUIRED_FIELDS ()
 
static vtkInformationStringVectorKey * INPUT_REQUIRED_DATA_TYPE ()
 
static vtkInformationInformationVectorKey * INPUT_ARRAYS_TO_PROCESS ()
 
static vtkInformationIntegerKey * INPUT_PORT ()
 
static vtkInformationIntegerKey * INPUT_CONNECTION ()
 
static vtkInformationIntegerKey * CAN_PRODUCE_SUB_EXTENT ()
 
static vtkInformationIntegerKey * CAN_HANDLE_PIECE_REQUEST ()
 
static void SetDefaultExecutivePrototype (vtkExecutive *proto)
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

Public Attributes

int AbortExecute
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
virtual int FillInputPortInformation (int port, vtkInformation *info)
 
virtual int FillOutputPortInformation (int port, vtkInformation *info)
 
virtual void SetNumberOfInputPorts (int n)
 
virtual void SetNumberOfOutputPorts (int n)
 
int InputPortIndexInRange (int index, const char *action)
 
int OutputPortIndexInRange (int index, const char *action)
 
int GetInputArrayAssociation (int idx, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, int connection, vtkInformationVector **inputVector)
 
int GetInputArrayAssociation (int idx, vtkDataObject *input)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkDataArray * GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkDataArray * GetInputArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkDataObject *input)
 
vtkDataArray * GetInputArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, int connection, vtkInformationVector **inputVector, int &association)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkDataObject *input)
 
vtkAbstractArray * GetInputAbstractArrayToProcess (int idx, vtkDataObject *input, int &association)
 
vtkInformation * GetInputArrayFieldInformation (int idx, vtkInformationVector **inputVector)
 
virtual vtkExecutive * CreateDefaultExecutive ()
 
virtual void SetErrorCode (unsigned long)
 
void ReportReferences (vtkGarbageCollector *) VTK_OVERRIDE
 
virtual void SetNthInputConnection (int port, int index, vtkAlgorithmOutput *input)
 
virtual void SetNumberOfInputConnections (int port, int n)
 
void SetInputDataInternal (int port, vtkDataObject *input)
 
void AddInputDataInternal (int port, vtkDataObject *input)
 
- Protected Member Functions inherited from vtkObject
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) VTK_OVERRIDE
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
virtual void CollectRevisions (ostream &)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static vtkInformationIntegerKey * PORT_REQUIREMENTS_FILLED ()
 

Protected Attributes

vtkInformation * Information
 
unsigned long ErrorCode
 
double Progress
 
char * ProgressText
 
vtkProgressObserver * ProgressObserver
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Static Protected Attributes

static vtkExecutive * DefaultExecutivePrototype
 

Detailed Description

Superclass for all sources, filters, and sinks in VTK.

vtkAlgorithm is the superclass for all sources, filters, and sinks in VTK. It defines a generalized interface for executing data processing algorithms. Pipeline connections are associated with input and output ports that are independent of the type of data passing through the connections.

Instances may be used independently or within pipelines with a variety of architectures and update mechanisms. Pipelines are controlled by instances of vtkExecutive. Every vtkAlgorithm instance has an associated vtkExecutive when it is used in a pipeline. The executive is responsible for data flow.

Member Enumeration Documentation

◆ DesiredOutputPrecision

Values used for setting the desired output precision for various algorithms. Currently, the following algorithms support changing their output precision: vtkAppendFilter, vtkAppendPoints, vtkContourFilter, vtkContourGrid, vtkCutter, vtkGridSynchronizedTemplates3D, vtkPolyDataNormals, vtkSynchronizedTemplatesCutter3D, vtkTableBasedClipDataSet, vtkThreshold, vtkTransformFilter, and vtkTransformPolyData.

SINGLE_PRECISION - Output single-precision floating-point (i.e. float) DOUBLE_PRECISION - Output double-precision floating-point (i.e. double) DEFAULT_PRECISION - Output precision should match the input precision.

Member Function Documentation

◆ AddInputConnection()

virtual void vtkAlgorithm::AddInputConnection ( int  port,
vtkAlgorithmOutput *  input 
)
virtual

Add a connection to the given input port index. See SetInputConnection() for details on input connections. This method is the complement to RemoveInputConnection() in that it adds only the connection specified without affecting other connections. Typical usage is

filter2->AddInputConnection(0, filter1->GetOutputPort(0)).

◆ AddInputDataObject()

virtual void vtkAlgorithm::AddInputDataObject ( int  port,
vtkDataObject *  data 
)
virtual

Add the data-object as an input to this given port. This will add a new input connection on the specified port without affecting any existing connections on the same input port.

◆ CAN_HANDLE_PIECE_REQUEST()

static vtkInformationIntegerKey* vtkAlgorithm::CAN_HANDLE_PIECE_REQUEST ( )
static

Key that tells the pipeline that a particular algorithm can or cannot handle piece request. If a filter cannot handle piece requests and is asked for a piece, the executive will flag an error. If a structured data source cannot handle piece requests but can produce sub-extents (CAN_PRODUCE_SUB_EXTENT), the executive will use an extent translator to split the extent into pieces. Otherwise, if a source cannot handle piece requests, the executive will ask for the whole data for piece 0 and not execute the source for other pieces.

◆ CAN_PRODUCE_SUB_EXTENT()

static vtkInformationIntegerKey* vtkAlgorithm::CAN_PRODUCE_SUB_EXTENT ( )
static

This key tells the executive that a particular output port is capable of producing an arbitrary subextent of the whole extent. Many image sources and readers fall into this category but some such as the legacy structured data readers cannot support this feature.

◆ ComputePipelineMTime()

virtual int vtkAlgorithm::ComputePipelineMTime ( vtkInformation *  request,
vtkInformationVector **  inInfoVec,
vtkInformationVector *  outInfoVec,
int  requestFromOutputPort,
vtkMTimeType *  mtime 
)
virtual

A special version of ProcessRequest meant specifically for the pipeline modified time request. See vtkExecutive::ComputePipelineMTime() for details.

◆ ConvertTotalInputToPortConnection()

void vtkAlgorithm::ConvertTotalInputToPortConnection ( int  ind,
int &  port,
int &  conn 
)

Convenience routine to convert from a linear ordering of input connections to a port/connection pair.

◆ CreateDefaultExecutive()

virtual vtkExecutive* vtkAlgorithm::CreateDefaultExecutive ( )
protectedvirtual

Create a default executive. If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using NewInstance(). Otherwise, vtkStreamingDemandDrivenPipeline is created.

◆ FillInputPortInformation()

virtual int vtkAlgorithm::FillInputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

Fill the input port information objects for this algorithm. This is invoked by the first call to GetInputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented in vtkImageAlgorithm, and vtkDICOMWriter.

◆ FillOutputPortInformation()

virtual int vtkAlgorithm::FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
protectedvirtual

Fill the output port information objects for this algorithm. This is invoked by the first call to GetOutputPortInformation for each port so subclasses can specify what they can handle.

Reimplemented in vtkImageAlgorithm.

◆ GetErrorCode()

virtual unsigned long vtkAlgorithm::GetErrorCode ( )
virtual

The error code contains a possible error that occurred while reading or writing the file.

◆ GetExecutive()

vtkExecutive* vtkAlgorithm::GetExecutive ( )

Get this algorithm's executive. If it has none, a default executive will be created.

◆ GetInformation()

virtual vtkInformation* vtkAlgorithm::GetInformation ( )
virtual

Set/Get the information object associated with this algorithm.

◆ GetInputAbstractArrayToProcess() [1/2]

vtkAbstractArray* vtkAlgorithm::GetInputAbstractArrayToProcess ( int  idx,
int  connection,
vtkInformationVector **  inputVector 
)
protected

Filters that have multiple connections on one port can use this signature. This will override the connection id that the user set in SetInputArrayToProcess() with the connection id passed. This way, the user specifies one array to process and that information is used to obtain arrays for all the connection on the port with the appropriate connection id substituted.

◆ GetInputAbstractArrayToProcess() [2/2]

vtkAbstractArray* vtkAlgorithm::GetInputAbstractArrayToProcess ( int  idx,
vtkInformationVector **  inputVector 
)
protected

Get the actual data array for the input array specified by idx, this is only reasonable during the REQUEST_DATA pass

◆ GetInputAlgorithm() [1/3]

vtkAlgorithm* vtkAlgorithm::GetInputAlgorithm ( )
inline

Equivalent to GetInputAlgorithm(0, 0).

◆ GetInputAlgorithm() [2/3]

vtkAlgorithm* vtkAlgorithm::GetInputAlgorithm ( int  port,
int  index 
)

Returns the algorithm connected to a port-index pair.

◆ GetInputAlgorithm() [3/3]

vtkAlgorithm* 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.

◆ GetInputArrayAssociation() [1/2]

int vtkAlgorithm::GetInputArrayAssociation ( int  idx,
int  connection,
vtkInformationVector **  inputVector 
)
protected

Filters that have multiple connections on one port can use this signature. This will override the connection id that the user set in SetInputArrayToProcess() with the connection id passed. This way, the user specifies one array to process and that information is used to obtain arrays for all the connection on the port with the appropriate connection id substituted.

◆ GetInputArrayAssociation() [2/2]

int vtkAlgorithm::GetInputArrayAssociation ( int  idx,
vtkInformationVector **  inputVector 
)
protected

Get the assocition of the actual data array for the input array specified by idx, this is only reasonable during the REQUEST_DATA pass.

◆ GetInputArrayFieldInformation()

vtkInformation* vtkAlgorithm::GetInputArrayFieldInformation ( int  idx,
vtkInformationVector **  inputVector 
)
protected

This method takes in an index (as specified in SetInputArrayToProcess) and a pipeline information vector. It then finds the information about input array idx and then uses that information to find the field information from the relevant field in the pifo vector (as done by vtkDataObject::GetActiveFieldInformation)

◆ GetInputArrayInformation()

vtkInformation* vtkAlgorithm::GetInputArrayInformation ( int  idx)

Get the info object for the specified input array to this algorithm

◆ GetInputArrayToProcess() [1/2]

vtkDataArray* vtkAlgorithm::GetInputArrayToProcess ( int  idx,
int  connection,
vtkInformationVector **  inputVector 
)
protected

Filters that have multiple connections on one port can use this signature. This will override the connection id that the user set in SetInputArrayToProcess() with the connection id passed. This way, the user specifies one array to process and that information is used to obtain arrays for all the connection on the port with the appropriate connection id substituted.

◆ GetInputArrayToProcess() [2/2]

vtkDataArray* vtkAlgorithm::GetInputArrayToProcess ( int  idx,
vtkInformationVector **  inputVector 
)
protected

Get the actual data array for the input array specified by idx, this is only reasonable during the REQUEST_DATA pass

◆ GetInputConnection()

vtkAlgorithmOutput* vtkAlgorithm::GetInputConnection ( int  port,
int  index 
)

Get the algorithm output port connected to an input port.

◆ GetInputDataObject()

vtkDataObject* vtkAlgorithm::GetInputDataObject ( int  port,
int  connection 
)

Get the data object that will contain the algorithm input for the given port and given connection.

◆ GetInputExecutive() [1/2]

vtkExecutive* vtkAlgorithm::GetInputExecutive ( )
inline

Equivalent to GetInputExecutive(0, 0)

◆ GetInputExecutive() [2/2]

vtkExecutive* vtkAlgorithm::GetInputExecutive ( int  port,
int  index 
)

Returns the executive associated with a particular input connection.

◆ GetInputInformation() [1/2]

vtkInformation* vtkAlgorithm::GetInputInformation ( )
inline

Equivalent to GetInputInformation(0, 0)

◆ GetInputInformation() [2/2]

vtkInformation* vtkAlgorithm::GetInputInformation ( int  port,
int  index 
)

Return the information object that is associated with a particular input connection. This can be used to get meta-data coming from the REQUEST_INFORMATION pass and set requests for the REQUEST_UPDATE_EXTENT pass. NOTE: Do not use this in any of the pipeline passes. Use the information objects passed as arguments instead.

◆ GetInputPortInformation()

vtkInformation* vtkAlgorithm::GetInputPortInformation ( int  port)

Get the information object associated with an input port. There is one input port per kind of input to the algorithm. Each input port tells executives what kind of data and downstream requests this algorithm can handle for that input.

◆ GetNumberOfInputConnections()

int vtkAlgorithm::GetNumberOfInputConnections ( int  port)

Get the number of inputs currently connected to a port.

◆ GetNumberOfInputPorts()

int vtkAlgorithm::GetNumberOfInputPorts ( )

Get the number of input ports used by the algorithm.

◆ GetNumberOfOutputPorts()

int vtkAlgorithm::GetNumberOfOutputPorts ( )

Get the number of output ports provided by the algorithm.

◆ GetOutputDataObject()

vtkDataObject* vtkAlgorithm::GetOutputDataObject ( int  port)

Get the data object that will contain the algorithm output for the given port.

◆ GetOutputInformation()

vtkInformation* vtkAlgorithm::GetOutputInformation ( int  port)

Return the information object that is associated with a particular output port. This can be used to set meta-data coming during the REQUEST_INFORMATION. NOTE: Do not use this in any of the pipeline passes. Use the information objects passed as arguments instead.

◆ GetOutputPort()

vtkAlgorithmOutput* vtkAlgorithm::GetOutputPort ( int  index)

Get a proxy object corresponding to the given output port of this algorithm. The proxy object can be passed to another algorithm's SetInputConnection(), AddInputConnection(), and RemoveInputConnection() methods to modify pipeline connectivity.

◆ GetOutputPortInformation()

vtkInformation* vtkAlgorithm::GetOutputPortInformation ( int  port)

Get the information object associated with an output port. There is one output port per output from the algorithm. Each output port tells executives what kind of upstream requests this algorithm can handle for that output.

◆ GetTotalNumberOfInputConnections()

int vtkAlgorithm::GetTotalNumberOfInputConnections ( )

Get the total number of inputs for this algorithm

◆ GetUpdateExtent()

int* vtkAlgorithm::GetUpdateExtent ( )
inline

These functions return the update extent for output ports that use 3D extents. Where port is not specified, it is assumed to be 0.

◆ GetUpdatePiece()

int vtkAlgorithm::GetUpdatePiece ( )
inline

These functions return the update extent for output ports that use piece extents. Where port is not specified, it is assumed to be 0.

◆ HasExecutive()

int vtkAlgorithm::HasExecutive ( )

Check whether this algorithm has an assigned executive. This will NOT create a default executive.

◆ INPUT_IS_OPTIONAL()

static vtkInformationIntegerKey* vtkAlgorithm::INPUT_IS_OPTIONAL ( )
static

Keys used to specify input port requirements.

◆ IsA()

virtual vtkTypeBool vtkAlgorithm::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkObjectBase.

Reimplemented in vtkThreadedImageAlgorithm, vtkScancoCTReader, vtkNIFTIWriter, vtkNIFTIReader, vtkImageWriter, vtkImageReader2, vtkImageReader, vtkImageAlgorithm, vtkDICOMWriter, vtkDICOMToRAS, vtkDICOMReader, vtkDICOMDirectory, vtkDICOMCTRectifier, vtkDICOMApplyRescale, vtkDICOMApplyPalette, and vtkDICOMAlgorithm.

◆ ModifyRequest()

virtual int vtkAlgorithm::ModifyRequest ( vtkInformation *  request,
int  when 
)
virtual

This method gives the algorithm a chance to modify the contents of a request before or after (specified in the when argument) it is forwarded. The default implementation is empty. Returns 1 on success, 0 on failure. When can be either vtkExecutive::BeforeForward or vtkExecutive::AfterForward.

◆ PrintSelf()

void vtkAlgorithm::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObjectBase.

Reimplemented in vtkThreadedImageAlgorithm, vtkImageAlgorithm, vtkScancoCTReader, vtkNIFTIWriter, vtkNIFTIReader, vtkDICOMWriter, vtkDICOMToRAS, vtkDICOMReader, vtkDICOMDirectory, vtkDICOMCTRectifier, vtkDICOMApplyRescale, vtkDICOMApplyPalette, vtkDICOMAlgorithm, vtkImageWriter, vtkImageReader2, and vtkImageReader.

◆ ProcessRequest() [1/2]

int vtkAlgorithm::ProcessRequest ( vtkInformation *  request,
vtkCollection *  inInfo,
vtkInformationVector *  outInfo 
)

Version of ProcessRequest() that is wrapped. This converts the collection to an array and calls the other version.

◆ ProcessRequest() [2/2]

virtual int vtkAlgorithm::ProcessRequest ( vtkInformation *  request,
vtkInformationVector **  inInfo,
vtkInformationVector *  outInfo 
)
virtual

Upstream/Downstream requests form the generalized interface through which executives invoke a algorithm's functionality. Upstream requests correspond to information flow from the algorithm's outputs to its inputs. Downstream requests correspond to information flow from the algorithm's inputs to its outputs.

A downstream request is defined by the contents of the request information object. The input to the request is stored in the input information vector passed to ProcessRequest. The results of an downstream request are stored in the output information vector passed to ProcessRequest.

An upstream request is defined by the contents of the request information object. The input to the request is stored in the output information vector passed to ProcessRequest. The results of an upstream request are stored in the input information vector passed to ProcessRequest.

It returns the boolean status of the pipeline (false means failure).

Reimplemented in vtkDICOMReader, and vtkImageAlgorithm.

◆ PropagateUpdateExtent()

virtual void vtkAlgorithm::PropagateUpdateExtent ( )
virtual

Propagate meta-data upstream.

◆ Register()

void vtkAlgorithm::Register ( vtkObjectBase o)
virtual

Participate in garbage collection.

Reimplemented from vtkObjectBase.

◆ RemoveAllInputConnections()

virtual void vtkAlgorithm::RemoveAllInputConnections ( int  port)
virtual

Removes all input connections.

◆ RemoveAllInputs()

void vtkAlgorithm::RemoveAllInputs ( )

Remove all the input data.

◆ RemoveInputConnection() [1/2]

virtual void vtkAlgorithm::RemoveInputConnection ( int  port,
int  idx 
)
virtual

Remove a connection given by index idx.

◆ RemoveInputConnection() [2/2]

virtual void vtkAlgorithm::RemoveInputConnection ( int  port,
vtkAlgorithmOutput *  input 
)
virtual

Remove a connection from the given input port index. See SetInputConnection() for details on input connection. This method is the complement to AddInputConnection() in that it removes only the connection specified without affecting other connections. Typical usage is

filter2->RemoveInputConnection(0, filter1->GetOutputPort(0)).

◆ SetAbortExecute()

virtual void vtkAlgorithm::SetAbortExecute ( int  )
virtual

Set/Get the AbortExecute flag for the process object. Process objects may handle premature termination of execution in different ways.

◆ SetDefaultExecutivePrototype()

static void vtkAlgorithm::SetDefaultExecutivePrototype ( vtkExecutive *  proto)
static

If the DefaultExecutivePrototype is set, a copy of it is created in CreateDefaultExecutive() using NewInstance().

◆ SetErrorCode()

virtual void vtkAlgorithm::SetErrorCode ( unsigned long  )
protectedvirtual

The error code contains a possible error that occurred while reading or writing the file.

Reimplemented in vtkDICOMDirectory.

◆ SetExecutive()

virtual void vtkAlgorithm::SetExecutive ( vtkExecutive *  executive)
virtual

Set this algorithm's executive. This algorithm is removed from any executive to which it has previously been assigned and then assigned to the given executive.

◆ SetInputArrayToProcess() [1/2]

virtual void vtkAlgorithm::SetInputArrayToProcess ( int  idx,
int  port,
int  connection,
const char *  fieldAssociation,
const char *  attributeTypeorName 
)
virtual

String based versions of SetInputArrayToProcess(). Because fieldAssociation and fieldAttributeType are enums, they cannot be easily accessed from scripting language. These methods provides an easy and safe way of passing association and attribute type information. Field association is one of the following:

* vtkDataObject::FIELD_ASSOCIATION_POINTS
* vtkDataObject::FIELD_ASSOCIATION_CELLS
* vtkDataObject::FIELD_ASSOCIATION_NONE
* vtkDataObject::FIELD_ASSOCIATION_POINTS_THEN_CELLS
* 

Attribute type is one of the following:

* vtkDataSetAttributes::SCALARS
* vtkDataSetAttributes::VECTORS
* vtkDataSetAttributes::NORMALS
* vtkDataSetAttributes::TCOORDS
* vtkDataSetAttributes::TENSORS
* 

If the last argument is not an attribute type, it is assumed to be an array name.

◆ SetInputArrayToProcess() [2/2]

virtual void vtkAlgorithm::SetInputArrayToProcess ( int  idx,
int  port,
int  connection,
int  fieldAssociation,
const char *  name 
)
virtual

Set the input data arrays that this algorithm will process. Specifically the idx array that this algorithm will process (starting from 0) is the array on port, connection with the specified association and name or attribute type (such as SCALARS). The fieldAssociation refers to which field in the data object the array is stored. See vtkDataObject::FieldAssociations for detail.

◆ SetInputConnection()

virtual void vtkAlgorithm::SetInputConnection ( int  port,
vtkAlgorithmOutput *  input 
)
virtual

Set the connection for the given input port index. Each input port of a filter has a specific purpose. A port may have zero or more connections and the required number is specified by each filter. Setting the connection with this method removes all other connections from the port. To add more than one connection use AddInputConnection().

The input for the connection is the output port of another filter, which is obtained with GetOutputPort(). Typical usage is

filter2->SetInputConnection(0, filter1->GetOutputPort(0)).

◆ SetInputDataInternal()

void vtkAlgorithm::SetInputDataInternal ( int  port,
vtkDataObject *  input 
)
inlineprotected

These methods are used by subclasses to implement methods to set data objects directly as input. Internally, they create a vtkTrivialProducer that has the data object as output and connect it to the algorithm.

◆ SetInputDataObject()

virtual void vtkAlgorithm::SetInputDataObject ( int  port,
vtkDataObject *  data 
)
virtual

Sets the data-object as an input on the given port index. Setting the input with this method removes all other connections from the port. Internally, this method creates a vtkTrivialProducer instance and sets that as the input-connection for the given port. It is safe to call this method repeatedly with the same input data object. The MTime of the vtkAlgorithm will not change unless the data object changed.

◆ SetNthInputConnection()

virtual void vtkAlgorithm::SetNthInputConnection ( int  port,
int  index,
vtkAlgorithmOutput *  input 
)
protectedvirtual

Replace the Nth connection on the given input port. For use only by this class and subclasses. If this is used to store a NULL input then the subclass must be able to handle NULL inputs in its ProcessRequest method.

◆ SetNumberOfInputConnections()

virtual void vtkAlgorithm::SetNumberOfInputConnections ( int  port,
int  n 
)
protectedvirtual

Set the number of input connections on the given input port. For use only by this class and subclasses. If this is used to store a NULL input then the subclass must be able to handle NULL inputs in its ProcessRequest method.

◆ SetNumberOfInputPorts()

virtual void vtkAlgorithm::SetNumberOfInputPorts ( int  n)
protectedvirtual

Set the number of input ports used by the algorithm.

◆ SetNumberOfOutputPorts()

virtual void vtkAlgorithm::SetNumberOfOutputPorts ( int  n)
protectedvirtual

Set the number of output ports provided by the algorithm.

◆ SetProgress()

virtual void vtkAlgorithm::SetProgress ( double  )
virtual

Set/Get the execution progress of a process object.

◆ SetProgressObserver()

void vtkAlgorithm::SetProgressObserver ( vtkProgressObserver *  )

If an ProgressObserver is set, the algorithm will report progress through it rather than directly. This means that it will call UpdateProgress() on the ProgressObserver rather than itself report it and set progress. This is most useful in situations where multiple threads are executing an algorithm at the same time and want to handle progress locally.

◆ SetProgressText()

void vtkAlgorithm::SetProgressText ( const char *  ptext)

Set the current text message associated with the progress state. This may be used by a calling process/GUI. Note: Because SetProgressText() is called from inside RequestData() it does not modify the algorithm object. Algorithms are not allowed to modify themselves from inside RequestData().

◆ SetReleaseDataFlag()

virtual void vtkAlgorithm::SetReleaseDataFlag ( int  )
virtual

Turn release data flag on or off for all output ports.

◆ SetUpdateExtent() [1/4]

void vtkAlgorithm::SetUpdateExtent ( int  extent[6])

Convenience function equivalent to SetUpdateExtent(0, extent)

◆ SetUpdateExtent() [2/4]

void vtkAlgorithm::SetUpdateExtent ( int  piece,
int  numPieces,
int  ghostLevel 
)

Convenience function equivalent to SetUpdateExtent(0, piece, numPieces, ghostLevel)

◆ SetUpdateExtent() [3/4]

void vtkAlgorithm::SetUpdateExtent ( int  port,
int  extent[6] 
)

Set the output update extent for data objects that use 3D extents

◆ SetUpdateExtent() [4/4]

void vtkAlgorithm::SetUpdateExtent ( int  port,
int  piece,
int  numPieces,
int  ghostLevel 
)

Set the output update extent in terms of piece and ghost levels.

◆ SetUpdateExtentToWholeExtent() [1/2]

int vtkAlgorithm::SetUpdateExtentToWholeExtent ( )

Convenience function equivalent to SetUpdateExtentToWholeExtent(0) This method assumes that the whole extent is known (that UpdateInformation has been called).

◆ SetUpdateExtentToWholeExtent() [2/2]

int vtkAlgorithm::SetUpdateExtentToWholeExtent ( int  port)

If the whole output extent is required, this method can be called to set the output update extent to the whole extent. This method assumes that the whole extent is known (that UpdateInformation has been called).

◆ UnRegister()

void vtkAlgorithm::UnRegister ( vtkObjectBase o)
virtual

Decrease the reference count (release by another object). This has the same effect as invoking Delete() (i.e., it reduces the reference count by 1).

Reimplemented from vtkObjectBase.

◆ Update() [1/3]

virtual void vtkAlgorithm::Update ( int  port)
virtual

Bring this algorithm's outputs up-to-date.

Reimplemented in vtkDICOMDirectory.

◆ Update() [2/3]

virtual int vtkAlgorithm::Update ( int  port,
vtkInformationVector *  requests 
)
virtual

This method enables the passing of data requests to the algorithm to be used during execution (in addition to bringing a particular port up-to-date). The requests argument should contain an information object for each port that requests need to be passed. For each of those, the pipeline will copy all keys to the output information before execution. This is equivalent to:

* algorithm->UpdateInformation();
* for (int i=0; i<algorithm->GetNumberOfOutputPorts(); i++)
* {
* vtkInformation* portRequests = requests->GetInformationObject(i);
* if (portRequests)
* {
* algorithm->GetOutputInformation(i)->Append(portRequests);
* }
* }
* algorithm->Update();
* 

Available requests include UPDATE_PIECE_NUMBER(), UPDATE_NUMBER_OF_PIECES() UPDATE_EXTENT() etc etc.

Reimplemented in vtkDICOMDirectory.

◆ Update() [3/3]

virtual int vtkAlgorithm::Update ( vtkInformation *  requests)
virtual

Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details.

Reimplemented in vtkDICOMDirectory.

◆ UpdateDataObject()

virtual void vtkAlgorithm::UpdateDataObject ( )
virtual

Create output object(s).

◆ UpdateExtent()

virtual int vtkAlgorithm::UpdateExtent ( const int  extents[6])
virtual

Convenience method to update an algorithm after passing requests to its first output port. Supports extent request.

◆ UpdateExtentIsEmpty()

int vtkAlgorithm::UpdateExtentIsEmpty ( vtkInformation *  pinfo,
vtkDataObject *  output 
)

This detects when the UpdateExtent will generate no data This condition is satisfied when the UpdateExtent has zero volume (0,-1,...) or the UpdateNumberOfPieces is 0. The source uses this call to determine whether to call Execute.

◆ UpdateInformation()

virtual void vtkAlgorithm::UpdateInformation ( )
virtual

Bring the algorithm's information up-to-date.

◆ UpdatePiece()

virtual int vtkAlgorithm::UpdatePiece ( int  piece,
int  numPieces,
int  ghostLevels,
const int  extents[6] = 0 
)
virtual

Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details. Supports piece and extent (optional) requests.

◆ UpdateProgress()

void vtkAlgorithm::UpdateProgress ( double  amount)

Update the progress of the process object. If a ProgressMethod exists, executes it. Then set the Progress ivar to amount. The parameter amount should range between (0,1).

◆ UpdateTimeStep()

virtual int vtkAlgorithm::UpdateTimeStep ( double  time,
int  piece = -1,
int  numPieces = 1,
int  ghostLevels = 0,
const int  extents[6] = 0 
)
virtual

Convenience method to update an algorithm after passing requests to its first output port. See documentation for Update(int port, vtkInformationVector* requests) for details. Supports time, piece (optional) and extent (optional) requests.

◆ UpdateWholeExtent()

virtual void vtkAlgorithm::UpdateWholeExtent ( )
virtual

Bring this algorithm's outputs up-to-date.


The documentation for this class was generated from the following file: