Resource Base
Table of contents

Multiple-File Processing Methods - CaptureVisionRouter Class

Method Description
set_input Sets an image source to provide images for consecutive processing.
get_input Gets the attached image source adapter object of the capture vision router.
add_capture_state_listener Adds an object that listens to the state changes of the capture process.
remove_capture_state_listener Removes an object which listens to the state changes of the capture process.
add_image_source_state_listener Adds an object that listens to state changes of the image source.
remove_image_source_state_listener Removes an object which listens to state changes of the image source.
add_result_receiver Adds an object as the receiver of captured results.
remove_result_receiver Removes an object which was added as a receiver of captured results.
add_result_filter Adds an object as the filter of captured results.
remove_result_filter Removes an object which was added as a filter of captured results.
start_capturing Starts to process images consecutively.
stop_capturing Stops the consecutive processing.
pause_capturing Pauses the capture process. The current thread will be blocked until the capture process is resumed.
resume_capturing Resumes the capture process. The current thread will be unblocked after the capture process is resumed.

set_input

Sets an image source to provide images for consecutive processing.

def set_input(self, adapter: ImageSourceAdapter) -> Tuple[int, str]:

Parameters

adapter Specifies an object which has implemented the ImageSourceAdapter Class.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

ImageSourceAdapter

DirectoryFetcher

FileFetcher

get_input

Gets the attached image source adapter object of the capture vision router.

def get_input(self) -> ImageSourceAdapter:

Return Value

Returns the attached image source adapter object of the capture vision router.

See Also

ImageSourceAdapter

DirectoryFetcher

FileFetcher

add_capture_state_listener

Adds an object that listens to the state changes of the capture process.

def add_capture_state_listener(self, listener: CaptureStateListener) -> Tuple[int, str]:

Parameters

listener Specifies a listening object of the type CaptureStateListener to be added.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CaptureStateListener

remove_capture_state_listener

Removes an object which listens to the state changes of the capture process.

def remove_capture_state_listener(self, listener: CaptureStateListener) -> Tuple[int, str]:

Parameters

listener Specifies a listening object of the type CaptureStateListener to be removed.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CaptureStateListener

add_image_source_state_listener

Adds an object that listens to state changes of the image source.

def add_image_source_state_listener(self, listener: ImageSourceStateListener) -> Tuple[int, str]:

Parameters

listener Specifies a listening object of the type ImageSourceStateListener to be added.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

ImageSourceStateListener

remove_image_source_state_listener

Removes an object which listens to state changes of the image source.

def remove_image_source_state_listener(self, listener: ImageSourceStateListener) -> Tuple[int, str]:

Parameters

listener Specifies a listening object of the type ImageSourceStateListener to be removed.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

ImageSourceStateListener

add_result_receiver

Adds an object as the receiver of captured results.

def add_result_receiver(self, receiver: CapturedResultReceiver) -> Tuple[int, str]:

Parameters

receiver Specifies a receiver object of the type CapturedResultReceiver to be added.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CapturedResultReceiver

remove_result_receiver

Removes an object which was added as a receiver of captured results.

def remove_result_receiver(self, receiver: CapturedResultReceiver) -> Tuple[int, str]:

Parameters

receiver Specifies a receiver object of the type CapturedResultReceiver to be removed.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CapturedResultReceiver

add_result_filter

Adds an object as the filter of captured results.

def add_result_filter(self, filter: CapturedResultFilter) -> Tuple[int, str]:

Parameters

filter Specifies a filter object of the type CapturedResultFilter to be added.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CapturedResultFilter

remove_result_filter

Removes an object which was added as a filter of captured results.

def remove_result_filter(self, filter: CapturedResultFilter) -> Tuple[int, str]:

Parameters

filter Specifies a filter object of the type CapturedResultFilter to be removed.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

CapturedResultFilter

start_capturing

Starts to process images consecutively.

def start_capturing(self, template_name: str = "", wait_for_thread_exit: bool = False) -> Tuple[int, str]:

Parameters

template_name Specifies a CaptureVisionTemplate to use for capturing.

wait_for_thread_exit Indicates whether to wait for the capture process to complete before returning.

Remarks

  • There are two types of CaptureVisionTemplate: the preset ones which come with the SDK and the custom ones that get initialized when the user calls InitSettings / InitSettingsFromFile.
  • Please be aware that the preset CaptureVisionTemplates will be overwritten should the user call InitSettings / InitSettingsFromFile and pass his own settings.
  • If parameter template_name is not specified, the preset one named ‘Default’ will be used. However, if the preset ones have been overwritten as described above, the first CaptureVisionTemplate from the user’s own settings will be used instead.

Return Value

Returns a tuple containing following elements:

  • error_code <int>: The error code indicating the status of the operation.
  • error_message <str>: A descriptive message explaining the error.

See Also

EnumErrorCode

stop_capturing

Stops the multiple-file processing.

def stop_capturing(self, wait_for_remaining_tasks: bool = True, wait_for_thread_exit: bool = True) -> None:

Parameters

wait_for_remaining_tasks Indicates whether to wait for the remaining tasks to complete before returning. The default value is True.
wait_for_thread_exit Indicates whether to wait for the capture process to complete before returning. The default value is True.

pause_capturing

Pauses the capture process. The current thread will be blocked until the capture process is resumed.

def pause_capturing(self) -> None:

resume_capturing

Resumes the capture process. The current thread will be unblocked after the capture process is resumed.

def resume_capturing(self) -> None:

This page is compatible for:

Is this page helpful?

YesYes NoNo

In this article:

latest version

    Change +