Skip to content

VectorizeProcessor

Tiles processor that vectorizes a channel

Notes
  • Requires a raster channel

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

ignore_background_class

If True, the background class (value 0) is not vectorized

TYPE: bool DEFAULT: True

new_channel_name

New channel name

TYPE: ChannelName | str | None DEFAULT: None

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

from_config classmethod

Creates a vectorize processor from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: VectorizeProcessorConfig

RETURNS DESCRIPTION
VectorizeProcessor

Vectorize processor

__call__

Vectorizes the channel.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


VectorizeProcessorConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of VectorizeProcessor

Create the configuration from a config file
  • Use null instead of None
  • Use false or true instead of False or True
Example

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'VectorizeProcessor'
config:
  channel_name: 'my_channel'
  ignore_background_class: true
  new_channel_name: null
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

ignore_background_class

If True, the background class (value 0) is not vectorized - defaults to True

TYPE: bool

new_channel_name

New channel name - defaults to None

TYPE: ChannelName | str | None

max_num_threads

Maximum number of threads - defaults to None

TYPE: int | None