Commit 16fb538c authored by Brad King's avatar Brad King 💬
Browse files

STYLE: Improved documentation of pipeline connection methods. This partially addresses bug#2187.

parent 46032bfd
......@@ -16,7 +16,9 @@
// .SECTION Description
// vtkAlgorithm is the superclass for all sources, filters, and sinks
// in VTK. It defines a generalized interface for executing data
// processing algorithms.
// 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
......@@ -115,7 +117,7 @@ public:
// Description:
// Get the number of output ports provided by the algorithm.
int GetNumberOfOutputPorts();
// Description:
// Participate in garbage collection.
virtual void Register(vtkObjectBase* o);
......@@ -195,29 +197,53 @@ public:
vtkDataObject* GetOutputDataObject(int port);
// Description:
// Set the connection for the given input port index. Removes
// any other connections.
// 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)).
virtual void SetInputConnection(int port, vtkAlgorithmOutput* input);
virtual void SetInputConnection(vtkAlgorithmOutput* input);
// Description:
// Add a connection to the given input port index.
// 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)).
virtual void AddInputConnection(int port, vtkAlgorithmOutput* input);
// Description:
// Remove a connection from the given input port index.
// 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)).
virtual void RemoveInputConnection(int port, vtkAlgorithmOutput* input);
// Description:
// Get a proxy object corresponding to the given output port of this
// algorithm. The proxy object can be passed to another algorithm's
// InputConnection methods to modify pipeline connectivity.
// SetInputConnection(), AddInputConnection(), and
// RemoveInputConnection() methods to modify pipeline connectivity.
vtkAlgorithmOutput* GetOutputPort(int index);
vtkAlgorithmOutput* GetOutputPort() {
return this->GetOutputPort(0); }
// Description:
// Get the number of input currently connected to a port.
// Get the number of inputs currently connected to a port.
int GetNumberOfInputConnections(int port);
// Description:
......@@ -241,10 +267,9 @@ public:
virtual void UpdateWholeExtent();
// Description:
// Conviniance routine to convert from a linrar ordering of input
// connections to a port, connecction pair
void ConvertTotalInputToPortConnection(int ind, int &port, int &conn);
// Convenience routine to convert from a linear ordering of input
// connections to a port/connection pair.
void ConvertTotalInputToPortConnection(int ind, int& port, int& conn);
//======================================================================
//The following block of code is to support old style VTK applications. If
......
......@@ -65,12 +65,21 @@ public:
vtkDataObject *GetInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -84,14 +84,23 @@ public:
vtkRectilinearGrid *GetRectilinearGridOutput();
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject*);
void SetInput(int, vtkDataObject*);
void SetInput(vtkDataSet*);
void SetInput(int, vtkDataSet*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(vtkDataSet*);
void AddInput(int, vtkDataSet*);
......
......@@ -65,12 +65,21 @@ public:
vtkGenericDataSet *GetGenericDataSetInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -39,7 +39,13 @@ public:
vtkHierarchicalDataSet* GetOutput(int);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject*);
void SetInput(int, vtkDataObject*);
......
......@@ -49,8 +49,13 @@ public:
vtkInformationVector*);
// Description:
// Set/Get an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
......@@ -61,7 +66,10 @@ public:
vtkImageData *GetImageDataInput(int port);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
virtual void AddInput(vtkDataObject *);
virtual void AddInput(int, vtkDataObject*);
......
......@@ -65,12 +65,21 @@ public:
vtkDataObject *GetInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -64,14 +64,23 @@ public:
vtkUnstructuredGrid *GetUnstructuredGridOutput();
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject*);
void SetInput(int, vtkDataObject*);
void SetInput(vtkPointSet*);
void SetInput(int, vtkPointSet*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(vtkPointSet*);
void AddInput(int, vtkPointSet*);
......
......@@ -66,12 +66,21 @@ public:
vtkPolyData *GetPolyDataInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -66,12 +66,21 @@ public:
vtkRectilinearGrid *GetRectilinearGridInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -66,12 +66,21 @@ public:
vtkStructuredGrid *GetStructuredGridInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
......@@ -65,12 +65,21 @@ public:
vtkUnstructuredGrid *GetUnstructuredGridInput(int port);
// Description:
// Set an input of this algorithm.
// Set an input of this algorithm. You should not override these
// methods because they are not the only way to connect a pipeline.
// Note that these methods support old-style pipeline connections.
// When writing new code you should use the more general
// vtkAlgorithm::SetInputConnection(). These methods transform the
// input index to the input port index, not an index of a connection
// within a single port.
void SetInput(vtkDataObject *);
void SetInput(int, vtkDataObject*);
// Description:
// Add an input of this algorithm.
// Add an input of this algorithm. Note that these methods support
// old-style pipeline connections. When writing new code you should
// use the more general vtkAlgorithm::AddInputConnection(). See
// SetInput() for details.
void AddInput(vtkDataObject *);
void AddInput(int, vtkDataObject*);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment