Mask Switch:
The XIS_MaskSwitch node is designed to act as a logical switch for mask data within a node-based workflow. Its primary purpose is to control the flow of mask data based on a boolean condition, allowing you to enable or disable the passage of a mask through the node. This functionality is particularly useful in scenarios where conditional processing of mask data is required, such as selectively applying effects or transformations to certain parts of an image. By providing a simple on/off mechanism, the XIS_MaskSwitch node enhances the flexibility and control you have over your image processing tasks, making it easier to manage complex workflows with conditional logic.
Mask Switch Input Parameters:
enable
The enable parameter is a boolean input that determines whether the mask data should be passed through the node or not. When set to True, the node allows the mask input to be outputted, effectively enabling the mask's passage. Conversely, when set to False, the node outputs None, effectively disabling the mask's passage. This parameter is crucial for controlling the conditional flow of mask data in your workflow. The default value is True, meaning the mask is enabled by default.
mask_input
The mask_input parameter is an optional input that accepts the mask data you wish to control with the switch. This input can be any mask that you want to conditionally pass through the node based on the enable parameter. If the enable parameter is set to True, the mask provided here will be outputted; otherwise, the output will be None. This parameter allows you to integrate the node into workflows where mask data needs to be selectively processed.
Mask Switch Output Parameters:
mask_output
The mask_output parameter is the result of the node's execution, which is either the mask data provided in the mask_input parameter or None, depending on the state of the enable parameter. If enable is True, the output will be the same as the mask_input; if False, the output will be None. This output is essential for determining whether the mask data should continue through the workflow or be halted based on the conditional logic applied.
Mask Switch Usage Tips:
- Use the
enableparameter to dynamically control the flow of mask data in your workflow, allowing for conditional processing based on specific criteria or triggers. - Integrate the XIS_MaskSwitch node in complex workflows where certain operations should only be applied to specific parts of an image, enhancing the flexibility and efficiency of your processing pipeline.
Mask Switch Common Errors and Solutions:
Mask dimension mismatch
- Explanation: This error occurs when the mask input does not have the expected dimensions, which can lead to processing issues.
- Solution: Ensure that the mask input has the correct dimensions, typically a 2D array, before passing it to the node.
Missing mask input
- Explanation: This error arises when the
enableparameter is set toTrue, but no mask input is provided. - Solution: Provide a valid mask input when the
enableparameter is set toTrue, or setenabletoFalseif no mask is needed.
