Skip to content

SieveProcessor

Bases: IDMixin

Tiles processor that sieves a channel

Notes
  • Requires a raster channel

Implements the TilesProcessor protocol.

PARAMETER DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

threshold

Threshold (the minimum area of the polygon to retain) in pixels

TYPE: int

connectivity

Connectivity (FOUR or EIGHT)

TYPE: Connectivity DEFAULT: Connectivity.FOUR

new_channel_name

New channel name

TYPE: ChannelName | str | None DEFAULT: None

max_num_threads

Maximum number of threads

TYPE: int | None DEFAULT: None

id property

RETURNS DESCRIPTION
uuid.UUID

ID

from_config classmethod

Creates a sieve processor from the configuration.

PARAMETER DESCRIPTION
config

Configuration

TYPE: SieveProcessorConfig

RETURNS DESCRIPTION
SieveProcessor

Sieve processor

__call__

Sieves the channel.

PARAMETER DESCRIPTION
tiles

Tiles

TYPE: Tiles

RETURNS DESCRIPTION
Tiles

Tiles


SieveProcessorConfig

Bases: pydantic.BaseModel

Configuration for the from_config class method of SieveProcessor

Create the configuration from a config file
  • Use 4 or 8 instead of Connectivity.FOUR or Connectivity.EIGHT
  • Use null instead of None
Usage

You can create the configuration from a config file.

config.yaml
package: 'aviary'
name: 'SieveProcessor'
config:
  channel_name: 'my_channel'
  threshold: 10
  connectivity: 4
  new_channel_name: null
  max_num_threads: null
ATTRIBUTE DESCRIPTION
channel_name

Channel name

TYPE: ChannelName | str

threshold

Threshold (the minimum area of the polygon to retain) in pixels

TYPE: int

connectivity

Connectivity (FOUR or EIGHT) - defaults to FOUR

TYPE: Connectivity

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