Collect
Synopsis
This operator combines multiple input objects into a single collection.
Description
The Collect operator combines a variable number of input objects into a single collection. It is important to know that all input objects should be of the same IOObject class. In the Process View, collections are indicated by double lines. If the input objects are collections themselves then the output of this operator would be a collection of collections. However if theunfoldparameter is set to true then the output will be the union of all elements of the input collections. After combining objects into a collection, the Loop Collection operator can be used to iterate over this collection. The Select operator can be used to retrieve the required element of the collection.
Collections can be useful when you want to apply the same operations on a number of objects. The Collect operator will allow you to collect the required objects into a single collection, the Loop Collection operator will allow you to iterate over all collections and finally you can separate the input objects from collection by individually selecting the required element by using the Select operator.
Input
input
This operator can have multiple inputs. When one input is connected, anotherinputport becomes available which is ready to accept another input (if any). The order of inputs remains the same. The object supplied at the firstinputport of the Collect operator becomes the first element of the resultant collection. It is important to note that all input objects should be of the same IOObject class.
Output
collection
All the input objects are combined into a single collection and the resultant collection is delivered through this port.
Parameters
Unfold
这个标准ameter is only applicable when the input objects are collections. This parameter specifies whether collections received at the input ports should be unfolded. If the input objects are collections themselves and theunfoldparameter is set to false, then the output of this operator would be a collection of collections. However if theunfoldparameter is set to true then the output will be the union of all elements of the input collections.