Need better scanning performance?
OutputCondition
Overview
The parameter OutputCondition defines how the OutputTaskSetting object outputs results that satisfy multiple filter conditions across products. It allows you to configure complex filtering logic by combining results from multiple tasks and TargetROIDef objects using logical operators (AND/OR).
Use Cases:
- Filter outputs based on conditions from descendant TargetROIDef tasks
- Combine results from multiple processing tasks with logical operators
- Reference specific atomic result types from previous tasks
JSON Structure
Location in template:
OutputTaskSettingOptions[i]
└── OutputCondition
Parent object: OutputTaskSetting object
Example:
{
"OutputCondition": {
"TaskResultArray": [
{
"TargetROIDefName": "B",
"TaskSettingNameArray": ["B_task"],
"Operator": "AND",
"BackwardReferenceOutput": {
"ReferenceTaskNameArray": ["A_task"],
"ReferenceResultTypeArray":[ "ART_TEXT_LINE","ART_BARCODE","ART_FRAME", "ART_TABLE_CELL", "ART_COLOUR_REGION" ]
}
}
],
"Operator": "AND"
}
}
Example Explanation:
This configuration filters output results where:
- The top-level
Operatoris “AND”, requiring all conditions inTaskResultArrayto be met - Results from task “B_task” on TargetROIDef “B” must exist
- These results must have backward references to task “A_task”
- The referenced results must be one of the specified atomic result types (text lines, barcodes, frames, table cells, or color regions)
- This snippet shows only the
OutputConditionparameter.- To use it, embed this parameter within a OutputTaskSetting object.
- For the complete JSON structure, see:
Parameter Details
Operator (Top-Level)
The top-level Operator parameter defines how to combine the conditions from multiple items in the TaskResultArray.
| Operator Parameter Details |
|---|
| Type String |
| Range One of the following values: “OR”, “AND” |
| Default Value “AND” |
Explanation:
- “AND”: All conditions in
TaskResultArraymust be satisfied - “OR”: At least one condition in
TaskResultArraymust be satisfied
TaskResultArray
The parameter TaskResultArray is an array that configures multiple filtering conditions based on tasks from descendant TargetROIDef objects. Each array element represents one filtering condition.
Type: Array of objects
Each object in the array contains the following parameters:
TargetROIDefName
Specifies the name of the descendant TargetROIDef object to reference.
| TargetROIDefName Parameter Details |
|---|
| Type String |
| Range Must be one of the descendant TargetROIDef object names defined in your template |
| Default Value Mandatory (no default) |
TaskSettingNameArray
Specifies which tasks on the descendant TargetROIDef object to check for results.
| TaskSettingNameArray Parameter Details |
|---|
| Type String[] (Array of strings) |
| Range Each member must be a valid task name in the specified descendant TargetROIDef object |
| Default Value null |
Operator (Task-Level)
Defines how to combine multiple task results within this specific condition.
| Operator Parameter Details |
|---|
| Type String |
| Range One of the following values: “OR”, “AND” |
| Default Value “AND” |
Note: This is different from the top-level Operator. The task-level operator combines results within a single TaskResultArray item, while the top-level operator combines across multiple array items.
BackwardReferenceOutput
Configures backward reference filtering based on results from the reference (parent) TargetROIDef object.
ReferenceTaskNameArray
Specifies which tasks on the reference TargetROIDef object to check for backward references.
| ReferenceTaskNameArray Parameter Details |
|---|
| Type String[] (Array of strings) |
| Range Each member must be a valid task name in the reference TargetROIDef object |
| Default Value null |
ReferenceResultTypeArray
Specifies which types of atomic results to accept from the referenced tasks.
| ReferenceResultTypeArray Parameter Details |
|---|
| Type String[] (Array of strings) |
| Range Each member must be one of the following AtomicResultType values:- "ART_TEXT_LINE": Text line results- "ART_BARCODE": Barcode results- "ART_FRAME": Frame results- "ART_TABLE_CELL": Table cell results- "ART_COLOUR_REGION": Color region results |
| Default Value [“ART_TEXT_LINE”,”ART_BARCODE”,”ART_FRAME”] |
Terminology
- Reference TargetROIDef: The parent or current
TargetROIDefobject that contains theOutputTaskSettingwith thisOutputCondition - Descendant TargetROIDef: Child
TargetROIDefobjects that are referenced in theTaskResultArray - Backward Reference: A link from a descendant task result back to a parent task result
Best Practices
- Use meaningful names: Choose descriptive names for TargetROIDef and task settings to make your configuration easier to understand
- Start simple: Begin with a single condition and “AND” operator, then add complexity as needed
- Specify result types: Explicitly set
ReferenceResultTypeArrayto only include the atomic result types you actually need - Test conditions: Verify that your filter conditions work as expected with sample data before deploying