public class ProcessingPipeline extends com.aspose.ms.System.Collections.CollectionBase implements IProcessingAlgorithm
Represents an ordered chain of image processing algorithms.
Constructor and Description |
---|
ProcessingPipeline()
Initializes a new instance of the
ProcessingPipeline class. |
ProcessingPipeline(Collection<IProcessingAlgorithm> algorithms)
Initializes a new instance of the
ProcessingPipeline class. |
Modifier and Type | Method and Description |
---|---|
int |
add(IProcessingAlgorithm value)
Adds an object to the end of the
ProcessingPipeline . |
boolean |
contains(IProcessingAlgorithm value)
Determines whether this
ProcessingPipeline contains
the specified IProcessingAlgorithm . |
void |
copyTo(IProcessingAlgorithm[] array,
int index)
Copies the elements of the
ProcessingPipeline to an array,
starting at a particular array index. |
static ProcessingPipeline |
getDefault()
Gets a default pipeline of image preprocessing algorithms
|
IProcessingAlgorithm |
getItem(int index)
Gets the element at the specified index.
|
int |
indexOf(IProcessingAlgorithm value)
Searches for the specified
IProcessingAlgorithm and returns the zero-based index of
the first occurrence within the entire ProcessingPipeline . |
void |
insert(int index,
IProcessingAlgorithm value)
Inserts the elements of a collection into the
ProcessingPipeline at the specified index. |
protected void |
onValidate(Object value)
Performs additional custom processes when validating a value.
|
void |
process(OmrImage image,
Rectangle area)
Processes an image with a chain of image preprocessing algorithms.
|
void |
remove(IProcessingAlgorithm value)
Removes the first occurrence of a specific
IProcessingAlgorithm from
the ProcessingPipeline . |
void |
setItem(int index,
IProcessingAlgorithm value)
Sets the element at the specified index.
|
addItem, clear, contains, copyTo, get_Item, getCapacity, getInnerList, getList, getSyncRoot, indexOf, insertItem, isFixedSize, isReadOnly, isSynchronized, iterator, onClear, onClearComplete, onInsert, onInsertComplete, onRemove, onRemoveComplete, onSet, onSetComplete, removeAt, removeItem, set_Item, setCapacity, size
public ProcessingPipeline()
Initializes a new instance of the ProcessingPipeline
class.
public ProcessingPipeline(Collection<IProcessingAlgorithm> algorithms)
Initializes a new instance of the ProcessingPipeline
class.
algorithms
- The ordered collection of algorithms.public int add(IProcessingAlgorithm value)
Adds an object to the end of the ProcessingPipeline
.
value
- The IProcessingAlgorithm
to be added to the end of the ProcessingPipeline
.
The value cannot be null.ProcessingPipeline
index at which the value
has been added.public boolean contains(IProcessingAlgorithm value)
Determines whether this ProcessingPipeline
contains
the specified IProcessingAlgorithm
.
value
- The IProcessingAlgorithm
to locate in the ProcessingPipeline
.true
if this ProcessingPipeline
contains
the specified IProcessingAlgorithm
; otherwise, false
.public void copyTo(IProcessingAlgorithm[] array, int index)
Copies the elements of the ProcessingPipeline
to an array,
starting at a particular array index.
array
- The one-dimensional array that is the destination of the elements copied from
ProcessingPipeline
. The array must have zero-based indexing.index
- The zero-based index in array
at which copying begins.public static ProcessingPipeline getDefault()
Gets a default pipeline of image preprocessing algorithms
public IProcessingAlgorithm getItem(int index)
Gets the element at the specified index.
index
- The zero-based index of the element to get or set.public int indexOf(IProcessingAlgorithm value)
Searches for the specified IProcessingAlgorithm
and returns the zero-based index of
the first occurrence within the entire ProcessingPipeline
.
value
- The IProcessingAlgorithm
to locate in the ProcessingPipeline
.
The value cannot be null.value
within the entire
ProcessingPipeline
, if found; otherwise, -1.public void insert(int index, IProcessingAlgorithm value)
Inserts the elements of a collection into the ProcessingPipeline
at the specified index.
index
- The zero-based index at which the new elements should be inserted.value
- The IProcessingAlgorithm
that should be inserted into the ProcessingPipeline
.protected void onValidate(Object value)
Performs additional custom processes when validating a value.
onValidate
in class com.aspose.ms.System.Collections.CollectionBase
value
- The object to validate.public void process(OmrImage image, Rectangle area)
Processes an image with a chain of image preprocessing algorithms.
process
in interface IProcessingAlgorithm
image
- An image to process.area
- Area of image to be processed.public void remove(IProcessingAlgorithm value)
Removes the first occurrence of a specific IProcessingAlgorithm
from
the ProcessingPipeline
.
value
- The IProcessingAlgorithm
to remove from the ProcessingPipeline
.
The value cannot be null.public void setItem(int index, IProcessingAlgorithm value)
Sets the element at the specified index.
index
- The zero-based index of the element to set.value
- The value of the element to setCopyright © 2017. All Rights Reserved.