| ca.forklabs.media.jai.CollectionDescriptor ca.forklabs.media.jai.operator.PipelineDescriptor
PipelineDescriptor | public class PipelineDescriptor extends CollectionDescriptor (Code) | | Class
PipelineDescriptor is an
OperationDescriptor describing
the pipeline operation. This operator operates in four modes,
rendered, renderable, collection and renderable collection.
The pipeline operation takes, optionally a source image, a list of
operations and a list of parameter blocks. The two lists must be parallel,
that is the first parameter block is applied to the first operation, the
second parameter block is applied to the second operation and so on.
The source image is not required if the first operation creates an image,
examples of such operations are core operations constant and
fileload. If this assumption is not respected, there will be errors
during the processing.
In the collection modes, the source image can either be a collection of
images or multiple source image. All the source images will be collated one
after the other into one collection.
The pipeline operation executes each operation, one after the other.
The source image of the first operation is the given source image while the
source image of the other operations is the sink image of its previous
operation.
Resource List
Name | Value |
GlobalName | Pipeline |
LocalName | Pipeline |
Vendor | ca.forklabs.media.jai.opimage |
Description | Multiple JAI operations seen as one |
DocURL | n/a |
Version | $Version$ |
Arg0Desct | The list of operations |
Arg1Desct | The list of parameter blocks |
Parameter List
Name | Class Type | Default Value |
operations |
String [] | new String[0] |
parameters |
ParameterBlock [] | new ParameterBlock[0] |
author: Daniel Léonard version: $Revision: 1.7 $ |
Method Summary | |
public static RenderedOp | create(RenderedImage source, String[] operations, ParameterBlock[] parameters, RenderingHints hints) Performs the list of operation in rendered mode.
Parameters: source - the initial source image, can be null if thefirst operation produces an image from its parameterblock. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . | public static Collection<RenderedImage> | createCollection(Collection<RenderedImage> sources, String[] operations, ParameterBlock[] parameters, RenderingHints hints) Performs the list of operation in collection mode.
Parameters: sources - the source images, can be null if the firstoperation produces images from its parameter block. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . | public static ParameterBlockJAI | createParameterBlock(String mode, Object source, String[] operations, ParameterBlock[] parameters) Creates and fills a new parameter block.
Parameters: mode - the rendering mode. Parameters: source - the source image. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. | public static RenderableOp | createRenderable(RenderableImage source, String[] operations, ParameterBlock[] parameters, RenderingHints hints) Performs the list of operation in renderable mode.
Parameters: source - the initial source image, can be null if thefirst operation produces an image from its parameterblock. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . | public static Collection<RenderableImage> | createRenderableCollection(Collection<RenderableImage> sources, String[] operations, ParameterBlock[] parameters, RenderingHints hints) Performs the list of operation in renderable collection mode.
Parameters: sources - the source images, can be null if the firstoperation produces images from its parameter block. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . | protected static String | getArg0Description() Gets the description for the first argument, the list of operations. | protected static String | getArg1Description() Gets the description for the second argument, the list of parameter
blocks. | protected String | getBadAlignmentErrorMessage(int o_len, int p_len) Gets the error message saying that there are not the same number of
operations and parameter blocks.
Parameters: o_len - the number of operations. Parameters: p_len - the number of parameter blocks. | protected static String | getDescription() Gets the description of this operation. | public boolean | isImmediate() This operation is in immediate mode. | protected boolean | validateParallelism(ParameterBlock pb, StringBuffer sb) Validates that the operator and parameter block lists have the same size.
Parameters: pb - the parameter block holding the lists. Parameters: sb - string buffer for error messages. | protected boolean | validateParameters(String mode, ParameterBlock pb, StringBuffer sb) Validates the input parameters, that is that there is the same number of
operations and parameter blocks.
Parameters: mode - the rendering mode. Parameters: pb - the parameter block. Parameters: sb - string buffer for error messages. |
NAME | final public static String NAME(Code) | | The name of this operator.
|
OPERATIONS_PARAMETER_INDEX | final public static int OPERATIONS_PARAMETER_INDEX(Code) | | The position of the operations parameter.
|
OPERATIONS_PARAMETER_NAME | final public static String OPERATIONS_PARAMETER_NAME(Code) | | The name of the operations parameter.
|
PARAMETERS_PARAMETER_INDEX | final public static int PARAMETERS_PARAMETER_INDEX(Code) | | The position of the parameters parameter.
|
PARAMETERS_PARAMETER_NAME | final public static String PARAMETERS_PARAMETER_NAME(Code) | | The name of the parameters parameter.
|
PipelineDescriptor | public PipelineDescriptor()(Code) | | Constructor.
|
create | public static RenderedOp create(RenderedImage source, String[] operations, ParameterBlock[] parameters, RenderingHints hints)(Code) | | Performs the list of operation in rendered mode.
Parameters: source - the initial source image, can be null if thefirst operation produces an image from its parameterblock. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . the rendered result image. |
createCollection | public static Collection<RenderedImage> createCollection(Collection<RenderedImage> sources, String[] operations, ParameterBlock[] parameters, RenderingHints hints)(Code) | | Performs the list of operation in collection mode.
Parameters: sources - the source images, can be null if the firstoperation produces images from its parameter block. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . the rendered result image. |
createParameterBlock | public static ParameterBlockJAI createParameterBlock(String mode, Object source, String[] operations, ParameterBlock[] parameters)(Code) | | Creates and fills a new parameter block.
Parameters: mode - the rendering mode. Parameters: source - the source image. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. a new parameter block. |
createRenderable | public static RenderableOp createRenderable(RenderableImage source, String[] operations, ParameterBlock[] parameters, RenderingHints hints)(Code) | | Performs the list of operation in renderable mode.
Parameters: source - the initial source image, can be null if thefirst operation produces an image from its parameterblock. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . the rendered result image. |
createRenderableCollection | public static Collection<RenderableImage> createRenderableCollection(Collection<RenderableImage> sources, String[] operations, ParameterBlock[] parameters, RenderingHints hints)(Code) | | Performs the list of operation in renderable collection mode.
Parameters: sources - the source images, can be null if the firstoperation produces images from its parameter block. Parameters: operations - the list of operations. Parameters: parameters - the list of parameter blocks. Parameters: hints - the rendering hints, may be null . the rendered result image. |
getArg0Description | protected static String getArg0Description()(Code) | | Gets the description for the first argument, the list of operations.
the description message. |
getArg1Description | protected static String getArg1Description()(Code) | | Gets the description for the second argument, the list of parameter
blocks.
the description message. |
getBadAlignmentErrorMessage | protected String getBadAlignmentErrorMessage(int o_len, int p_len)(Code) | | Gets the error message saying that there are not the same number of
operations and parameter blocks.
Parameters: o_len - the number of operations. Parameters: p_len - the number of parameter blocks. the error message. |
getDescription | protected static String getDescription()(Code) | | Gets the description of this operation.
the description message. |
isImmediate | public boolean isImmediate()(Code) | | This operation is in immediate mode.
always true . |
validateParallelism | protected boolean validateParallelism(ParameterBlock pb, StringBuffer sb)(Code) | | Validates that the operator and parameter block lists have the same size.
Parameters: pb - the parameter block holding the lists. Parameters: sb - string buffer for error messages. true if all is well, false otherwise. |
validateParameters | protected boolean validateParameters(String mode, ParameterBlock pb, StringBuffer sb)(Code) | | Validates the input parameters, that is that there is the same number of
operations and parameter blocks.
Parameters: mode - the rendering mode. Parameters: pb - the parameter block. Parameters: sb - string buffer for error messages. true if all is well, false otherwise. |
|
|