API Reference#
Databases#
- class volara.dbs.DB(*, node_attrs=None, edge_attrs=None, ndim=3)#
A base class for defining the common attributes and methods for all database types.
- property default_edge_attrs: dict[str, Any]#
The type definitions for the default edge attributes stored in our database.
Our DBs will always store edges between supervoxels with the following attributes:
distance: float:
The distance between center of masses of our super voxels
- property default_node_attrs: dict[str, Any]#
The type definitions for the default node attributes stored in our database.
Our DBs will always store supervoxels with the following attributes:
position: (float, float, float):
The center of mass of the supervoxel
size: int:
the number of voxels in this supervoxel
filtered: bool:
whether or not this fragment has been filtered out
- abstractmethod drop()#
Drop all nodes (supervoxels), edges, and metadata
- Return type:
None
- abstractmethod drop_edges()#
Drop all edges between nodes (supervoxels) leaving the nodes and metadata in tact.
- Return type:
None
- edge_attrs: dict[str, str | int] | None#
edge_attrs defines the custom edge attributes you may want to save between your super voxels. An example of some custom edge attrs is provided here:
edge_attrs={“z_aff”: “float”, “y_aff”: “float”, “x_aff”: “float”}
This adds a float columns with names [“{zyx}_affinity”] to the edges table in your graph db. You can later use these attributes by name to use these values in a blockwise task.
- property graph_attrs: tuple[dict[str, Any], dict[str, Any]]#
Get all node and edge attributes including default and user provided attributes
- abstract property id: str#
A unique identifier for this databse.
- init()#
Create database if it doesn’t exist yet.
- Return type:
None
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- ndim: int#
The dimensionality of your spatial data. This is used to define the number of coordinates used to index your node locations.
- node_attrs: dict[str, str | int] | None#
node_attrs defines the custom node attributes you may want to save for your super voxels. An example of some custom node attrs is provided here:
node_attrs={“raw_intensity”: “float”}
This adds a float column with name “raw_intensity” to the nodes table in your graph db. You can later use this attribute by name to use this value in a blockwise task.
- abstractmethod open(mode='r')#
Return a funlib.persistence.graphs.GraphDB instance.
- Return type:
SQLGraphDataBase
- abstractmethod spoof(nodes=True)#
Return a spoofed version of this database. This is used to create a database that can be used for testing purposes without writing to the original database. In some cases you may want access to the real nodes so by default we spoof both nodes and edges, but if you do not want to spoof the nodes, set nodes=False.
- class volara.dbs.PostgreSQL(*, node_attrs=None, edge_attrs=None, ndim=3, db_type='postgresql', host='localhost', port=None, name='volara', user=None, password=None)#
A PostgreSQL database for storing and retrieving graph data.
- drop()#
Drop all nodes (supervoxels), edges, and metadata
- Return type:
None
- drop_edges()#
Drop all edges between nodes (supervoxels) leaving the nodes and metadata in tact.
- Return type:
None
- property id: str#
A unique identifier for this databse.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- open(mode='r')#
Return a funlib.persistence.graphs.GraphDB instance.
- Return type:
PgSQLGraphDatabase
- spoof(nodes=True)#
Return a spoofed version of this database. This is used to create a database that can be used for testing purposes without writing to the original database. In some cases you may want access to the real nodes so by default we spoof both nodes and edges, but if you do not want to spoof the nodes, set nodes=False.
- class volara.dbs.SQLite(*, node_attrs=None, edge_attrs=None, ndim=3, db_type='sqlite', path)#
An SQLite database for storing and retrieving graph data.
- db_type: Literal['sqlite']#
A literal used for pydantic serialization and deserialization of DB Union types.
- drop()#
Drop all nodes (supervoxels), edges, and metadata
- Return type:
None
- drop_edges()#
Drop all edges between nodes (supervoxels) leaving the nodes and metadata in tact.
- Return type:
None
- property id: str#
A unique identifier for this databse.
- property local: Path#
The local file behind path.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- open(mode='r')#
Return a funlib.persistence.graphs.GraphDB instance.
- Return type:
SQLiteGraphDataBase
- path: UPath#
The path to the SQLite db file to use. SQLite needs a real file with locking, so a URL here is cast to a local path under
volara.paths.get_remote_root()with a warning (seevolara.paths.local_path()); usePostgreSQLfor a shared remote database.
- spoof(nodes=True)#
Return a spoofed version of this database. This is used to create a database that can be used for testing purposes without writing to the original database.
Datasets#
- class volara.datasets.Affs(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='affs', neighborhood=<factory>)#
Represents a dataset containing affinities. Requires the inclusion of the neighborhood for these affinities.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context)#
Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.
- volara.datasets.ArraySchedulerName#
A dask scheduler name accepted by
dask.compute(scheduler=...).alias of
Literal[‘single-threaded’, ‘synchronous’, ‘threads’, ‘processes’]
- class volara.datasets.CloudVolumeWrapper(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='cloudvolume', mip=0, timestamp=1794424830, agglomerate=True, data_name=None, fill_missing=False)#
Represents a volumetric dataset through Cloud Volume.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property name: str#
A name for this dataset. Often it is simply the name of the path provided as the store. We use it to differentiate between multiple runs of the same blockwise task on different data.
- class volara.datasets.Dataset(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None)#
A Dataset base class that defines the common attributes and methods for all dataset types.
- channels: list[list[int] | int] | int | None#
We want to be able to subsample channels from a dataset. Specifically we often want to slice away a channel e.g. make a [C,Z,Y,X] dataset into a [Z,Y,X] dataset by selecting only one channel, slice specific channels form a dataset e.g. make a [C,Z,Y,X] dataset into a [C’,Z,Y,X], or a combination of the two e.g. make a [T,C,Z,Y,X] dataset into a [C’,Z,Y,X] dataset.
Anything passed in will be passed directly to numpy indexing with np.s_[] with the exception of lists which will have each element passed to np.s_[] in sequence.
Valid options are: - 0: [C,Z,Y,X] -> [Z,Y,X] - [0,0]: [T,C,Z,Y,X] -> [Z,Y,X] - [[0,1,2]]: [C,Z,Y,X] -> [3,Z,Y,X]
- drop()#
Delete this dataset’s store wherever it lives; a missing store is a no-op.
- Return type:
None
- flip: list[int] | None#
Axis indices to reverse, applied AFTER channels has collapsed any leading axes – so they index the FINAL array, not the store. For a [T,C,Z,Y,X] store read with channels=[0, 0] the result is [Z,Y,X] and flip=[0] reverses Z.
Read-only: a reversed array reports is_writeable True but __setitem__ raises, so a write mode is refused up front rather than at the first write.
Corrects a volume acquired in a flipped orientation, so that nothing downstream needs to know. It is a lazy slice, not a copy, and it travels in this config – a worker that rebuilds the model applies the same reversal, which an in-memory wrapper would not.
- inner_chunk_shape: Optional[Coordinate]#
With
sharding, the chunk inside each shard, over every axis (channels included). Defaults to funlib’s: per axis, the largest divisor of the block up to 64 voxels.
- lazy_ops(arr)#
Apply any lazy operations to the array. By default, does nothing. Subclasses can override this method to apply specific lazy operations.
Runs before every op in resolved_ops. Raw no longer overrides it – its ome_norm, scale_shift and stack are named ops now, so for a subclass that calls super().lazy_ops(arr) those three move from before its own ops to after them, and for one that does not call super they are applied rather than suppressed. Relative to channels and flip this hook’s position is unchanged.
- Return type:
None
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property name: str#
A name for this dataset. Often it is simply the name of the path provided as the store. We use it to differentiate between multiple runs of the same blockwise task on different data.
- ops: list[Callable] | None#
Extra lazy operations, applied IN ORDER and AFTER every keyword-driven op.
Each is a plain callable
data -> data, cloudpickled to base64 so it reaches a worker the same way LambdaTask.lambda_func does. The escape hatch for a transform that has no keyword.Two limits of the callable path, both inherited from funlib:
A lambda or a __main__ function is pickled BY VALUE; one imported from a module is pickled by reference, so the worker must be able to import that module and gets whatever version it has installed.
funlib does not update an array’s roi or voxel_size for a callable op, so one that changes shape leaves the metadata describing the array before it. Use channels for that; it goes through funlib’s index path, which does update them.
Validation produces a fresh function object, so a Dataset carrying ops is NOT equal to its own round trip and two rebuilds of the same JSON are not equal to each other. A consumer that dedupes, caches or fences on a dataset config needs the keyword fields, which do compare equal, not this one.
Read-only, for the same reason: a callable makes the array unwriteable, so a write mode is refused up front rather than at the first block write.
See resolved_ops for the order the keyword fields resolve to, and volara.ops for why that order is fixed.
- property prepared_store#
the path itself when local, an fsspec-backed zarr store (carrying storage_options) otherwise.
- Type:
The object handed to prepare_ds/open_ds
- resolved_ops()#
Every op to apply, in order: the keyword-driven named ops, then
ops.Subclasses that add keywords of their own override this and prepend, as Raw does. See volara.ops for why the order is fixed.
- Return type:
list
- sharding: bool#
each block the task writes is one shard, made of smaller inner chunks.
Falsestores one chunk per block. An existing array is reused either way if its write unit (shard or chunk) is the block.- Type:
Store the array zarr v3 sharded
- storage_options: dict | None#
fsspec filesystem options for a remote store (credentials, a custom endpoint such as Lyve Cloud, …). None uses the environment. s3_kwargs is accepted as the former name.
- store: UPath#
a local path or a URL on any fsspec filesystem (s3://bucket/data.zarr/raw). Serialised as that string.
- Type:
Where the array lives
- class volara.datasets.LSD(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='lsd')#
Represents a dataset containing local shape descriptors.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.datasets.Labels(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='labels')#
Represents an integer label dataset.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.datasets.MaskDataset(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='mask')#
A per-block skip mask for a blockwise task.
Points to a zarr array in the task’s block-grid space: one element per block, not per voxel. Any nonzero value means “skip this block”, zero means “run it”. The array must have one cell per block of the task (
BlockwiseTask.block_grid_shape), and cell(0, 0, ...)is the first block of the task’swrite_roiwhatever the context.Handed to
BlockwiseTask.skip_mask, it is passed straight to daisy asTask(skip_mask=...): masked blocks are reported as skipped and release their downstream dependencies, but are never recorded as done, so the mask applies to the run it is passed to. A later run with a narrower mask (or none) runs the blocks it no longer covers, while blocks that completed stay done. This is the generic form of the surface-band skip: a thin predicted surface only touches a few blocks, so the rest can be skipped up front.Grid-space, not voxel-space: the inherited voxel-metadata fields are unused and the array may have any integer or bool dtype; daisy casts it. Read it like any other dataset, with
array(). How the mask is built is left to the caller.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.datasets.Raw(*, store, voxel_size=None, offset=None, axis_names=None, units=None, writable=True, ops=None, flip=None, channels=None, zarr_kwargs=<factory>, sharding=True, inner_chunk_shape=None, storage_options=None, dataset_type='raw', ome_norm=None, scale_shift=None, stack=None)#
Represents a dataset containing raw intensities. Has support for sampling specific channels, normalizing with provided scale and shifting, or reading in normalization bounds from OMERO metadata.
- property bounds: list[tuple[float, float]] | None#
one per channel the store carries.
- Type:
The windows ome_norm applies
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- resolved_ops()#
Raw’s three keywords all precede the base class’s, ome_norm first of all.
- Return type:
list
- volara.datasets.array_scheduler(scheduler)#
Open every array within this context with the given dask scheduler.
Dataset.array()hands the current value tofunlib.persistence.open_dsasscheduler, which is what the returnedArraycomputes its reads with.None(the default outside any context) leaves the choice to dask. Workers run underarray_scheduler, which is"single-threaded"by default: daisy already runs one block per worker, so dask’s thread pool would only add contention inside each worker.
- volara.datasets.current_array_scheduler()#
The scheduler
Dataset.array()will open arrays with right now.- Return type:
Optional[Literal['single-threaded','synchronous','threads','processes']]
Dataset Operations#
Ordered lazy operations for a Dataset.
Each keyword field (ome_norm, scale_shift, stack, channels, flip) becomes one of
the named ops here; Dataset.ops is a list of plain callables applied after all of them.
Dataset.resolved_ops assembles the two.
The order is a constraint, not a preference: OmeNormalize indexes the channel axis so it must
run BEFORE SelectChannels collapses it, and ReverseAxes names axes of the collapsed array so
it must run AFTER. A named op stays introspectable – a consumer can see that a dataset reverses z,
which a cloudpickled callable does not expose.
- class volara.ops.DatasetOp#
One lazy transform, applied to a funlib
Arrayin place.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.ops.OmeNormalize(*, op='ome_normalize', metadata)#
Scale each channel into [0, 1] using OMERO window bounds. Needs the channel axis PRESENT.
- property bounds: list[tuple[float, float]]#
Every
(min, max)window the metadata lists, in its own channel order.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- windows(channels)#
The first
channelsbounds; OMERO metadata often lists more than a store carries.- Return type:
list[tuple[float,float]]
- class volara.ops.ReverseAxes(*, op='reverse_axes', axes)#
Reverse the named axes of the array AS IT STANDS at this point in the list.
Read-only: a reversed array reports
is_writeableTrue while__setitem__raises, so a write mode is refused when this op is present.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.ops.ScaleShift(*, op='scale_shift', scale, shift)#
data * scale + shiftin float32.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.ops.SelectChannels(*, op='select_channels', channels)#
Collapse leading non-spatial axes, e.g.
[T,C,Z,Y,X] -> [Z,Y,X].Each element is applied in sequence to axis 0 of the array as it stands: an
intdrops that axis, alist[int]subsamples it. Passed tonp.s_[]as-is.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class volara.ops.StackWith(*, op='stack_with', other)#
Concatenate another dataset along axis 0.
otherisAnybecause typing it as aDatasetwould importvolara.datasets, which imports this module; the check apply makes is what the annotation cannot.- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid'}#
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- volara.ops.apply_op(op, arr)#
Apply a named op or a bare callable to
arr.- Return type:
None
Blockwise Tasks#
- volara.blockwise.get_task(task_type)#
Get the task class for a given task type. This is useful for dynamically fetching tasks from the base volara.blockwise module, despite some tasks potentially being defined in other modules as plugins via entry points. This allows volara to serialize and execute external tasks in isolated environments such as on cluster workers.
- Return type:
- pydantic model volara.blockwise.BlockwiseTask#
Show JSON schema
{ "title": "BlockwiseTask", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "title": "Fit", "type": "string" }, "read_write_conflict": { "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null } }, "$defs": { "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "fit", "read_write_conflict" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
array_scheduler (Literal['single-threaded', 'synchronous', 'threads', 'processes'] | None)block_timeout (float | None)fit (str)num_cache_workers (int | None)num_workers (int)read_write_conflict (bool)resource_tracking (bool)roi (Annotated[funlib.geometry.roi.Roi, volara.utils._RoiPydanticAnnotation] | None)skip_mask (volara.datasets.MaskDataset | None)worker_config (volara.workers.Worker | None)
- field array_scheduler: Literal['single-threaded', 'synchronous', 'threads', 'processes'] | None = 'single-threaded'#
The dask scheduler the workers compute array reads with. Every array a worker opens through
Dataset.array()(inprocess_block_func()and while processing blocks) is opened withfunlib.persistence.open_ds(..., scheduler=array_scheduler)."single-threaded"(the default) runs each read in the worker’s own thread: daisy already runs one block per worker, so dask’s thread pool would only add contention, and with many workers per machine it oversubscribes the cores.Noneleaves the choice to dask (its threaded scheduler for arrays), which is what volara did before this field existed.
- field block_timeout: float | None = None#
Per-block timeout in seconds.
None(the default) delegates to daisy’s default (600s). daisy v2 always enforces a timeout – there is no “unlimited” option – so blocks should be sized to process well within it; a task whose single block legitimately runs long (e.g. the global mutex watershed) must set an explicit large value instead (seeGraphMWS). When a block exceeds the timeout daisy reclaims it and retries undermax_retries.
- field fit: str [Required]#
The strategy to use for blocks that overhang your total write roi.
- field num_cache_workers: int | None = None#
The number of threads running the process_block function per worker. This allows you to start e.g. 4 gpu workers, each with 1 copy of the gpu loaded and running 8 threads to read, pre/postprocess, and write your data; maximizing your gpu utilization.
- field num_workers: int = 1#
The number of workers that will be started to process blocks in parallel
- field read_write_conflict: bool [Required]#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field resource_tracking: bool = True#
Ask daisy to measure every block: wall time, CPU time, peak RSS and IO bytes of the worker process while it ran the block. The figures land in the tracking group under
tracking_pathbeside the done markers, and daisy prints them in its Resource Utilization panel after the run.
- field roi: Annotated[Roi, _RoiPydanticAnnotation] | None = None#
An optional roi defining the total region to output.
- field skip_mask: MaskDataset | None = None#
An optional per-block skip mask (a
MaskDataset): a zarr array with one cell per block of this task (seeblock_grid_shape), nonzero = skip the block, zero = run it. Cell(0, 0, ...)is the first block ofwrite_roiwhatever the context.It is handed to daisy as
Task(skip_mask=...). Masked blocks are reported as skipped and release their downstream dependencies, but are not recorded as done, so the mask applies to the run it is passed to: a later run with a narrower mask (or none) runs the blocks it no longer covers, and blocks that completed stay done. A mask of the wrong shape is rejected before the run starts.
- field worker_config: Worker | None = None#
The configuration for each worker you start. This allows you to specify arguments for running workers on various platforms such as slurm/lsf clusters or AWS EC2.
- pydantic model volara.blockwise.AffAgglom#
A blockwise task that computes edges between supervoxels sharing affinity edges and stores statistics such as the mean affinity value between the supervoxels.
Show JSON schema
{ "title": "AffAgglom", "description": "A blockwise task that computes edges between supervoxels\nsharing affinity edges and stores statistics such as the\nmean affinity value between the supervoxels.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "aff-agglom", "default": "aff-agglom", "title": "Task Type", "type": "string" }, "db": { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ], "title": "Db" }, "affs_data": { "$ref": "#/$defs/Affs" }, "frags_data": { "$ref": "#/$defs/Labels" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" }, "context": { "items": { "type": "integer" }, "title": "Context", "type": "array" }, "scores": { "additionalProperties": { "items": { "items": { "type": "integer" }, "type": "array" }, "type": "array" }, "title": "Scores", "type": "object" }, "bulk_write": { "default": false, "title": "Bulk Write", "type": "boolean" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "PostgreSQL": { "additionalProperties": false, "description": "A PostgreSQL database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "postgresql", "default": "postgresql", "title": "Db Type", "type": "string" }, "host": { "default": "localhost", "title": "Host", "type": "string" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "name": { "default": "volara", "title": "Name", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" } }, "title": "PostgreSQL", "type": "object" }, "SQLite": { "additionalProperties": false, "description": "An SQLite database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "sqlite", "default": "sqlite", "title": "Db Type", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "SQLite", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "db", "affs_data", "frags_data", "block_size", "context", "scores" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
affs_data (volara.datasets.Affs)block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])bulk_write (bool)context (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])db (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')])fit (Literal['shrink'])frags_data (volara.datasets.Labels)read_write_conflict (Literal[False])scores (dict[str, list[Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation]]])task_type (Literal['aff-agglom'])
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
The blocksize within which to compute supervoxel affinity statistics
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field bulk_write: bool = False#
Whether to bulk-write to database (false by default). This removes/rebuilds indexes, and sets other useful flags for writing large amounts of data quickly, which can be useful for large runs to prevent database bottlenecks.
- field context: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
The amount of context to use when computing supervoxel affinity statistics
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field db: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] [Required]#
The database containing nodes associated with the fragment supervoxels to which we will add the supervoxel edge affinity statistics
- field fit: Literal['shrink'] = 'shrink'#
The boundary behavior for our daisy task.
- field frags_data: Labels [Required]#
The labels array containing the supervoxels for computing affinity statistics
- field read_write_conflict: Literal[False] = False#
We don’t have read write conflicts in this task and can compute every block independently in an arbitrary order.
- field scores: dict[str, list[Annotated[Coordinate, _CoordinatePydanticAnnotation]]] [Required]#
A dictionary of score names and their respective neighborhoods. This allows us to compute the affinity statistics in subgroups of the neighborhood. For example if you wanted to compute the mean affinity between fragments in x and y separately from z, you would provide a dictionary like so:
- scores = {
“xy”: [(1, 0, 0), (0, 1, 0)], “z”: [(0, 0, 1)]
}
- field task_type: Literal['aff-agglom'] = 'aff-agglom'#
- pydantic model volara.blockwise.ApplyShift#
Show JSON schema
{ "title": "ApplyShift", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "overhang", "default": "overhang", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "apply_shifts", "default": "apply_shifts", "title": "Task Type", "type": "string" }, "intensities": { "$ref": "#/$defs/Raw" }, "shifts": { "$ref": "#/$defs/Raw" }, "aligned": { "$ref": "#/$defs/Raw" }, "interp_shifts": { "anyOf": [ { "$ref": "#/$defs/Raw" }, { "type": "null" } ], "default": null }, "shift_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Shift Threshold" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "CloudVolumeWrapper": { "additionalProperties": false, "description": "Represents a volumetric dataset through Cloud Volume.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "cloudvolume", "default": "cloudvolume", "title": "Dataset Type", "type": "string" }, "mip": { "default": 0, "title": "Mip", "type": "integer" }, "timestamp": { "default": 1794424830, "title": "Timestamp", "type": "integer" }, "agglomerate": { "default": true, "title": "Agglomerate", "type": "boolean" }, "data_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Data Name" }, "fill_missing": { "default": false, "title": "Fill Missing", "type": "boolean" } }, "required": [ "store" ], "title": "CloudVolumeWrapper", "type": "object" }, "LSD": { "additionalProperties": false, "description": "Represents a dataset containing local shape descriptors.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "lsd", "default": "lsd", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "LSD", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Raw": { "additionalProperties": false, "description": "Represents a dataset containing raw intensities.\nHas support for sampling specific channels, normalizing\nwith provided scale and shifting, or reading in normalization\nbounds from OMERO metadata.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "raw", "default": "raw", "title": "Dataset Type", "type": "string" }, "ome_norm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ome Norm" }, "scale_shift": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Scale Shift" }, "stack": { "anyOf": [ { "discriminator": { "mapping": { "affs": "#/$defs/Affs", "cloudvolume": "#/$defs/CloudVolumeWrapper", "labels": "#/$defs/Labels", "lsd": "#/$defs/LSD", "mask": "#/$defs/MaskDataset", "raw": "#/$defs/Raw" }, "propertyName": "dataset_type" }, "oneOf": [ { "$ref": "#/$defs/Raw" }, { "$ref": "#/$defs/Affs" }, { "$ref": "#/$defs/LSD" }, { "$ref": "#/$defs/Labels" }, { "$ref": "#/$defs/MaskDataset" }, { "$ref": "#/$defs/CloudVolumeWrapper" } ] }, { "type": "null" } ], "default": null, "title": "Stack" } }, "required": [ "store" ], "title": "Raw", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "intensities", "shifts", "aligned" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
aligned (volara.datasets.Raw)fit (Literal['overhang'])intensities (volara.datasets.Raw)interp_shifts (volara.datasets.Raw | None)read_write_conflict (Literal[False])shift_threshold (float | None)shifts (volara.datasets.Raw)task_type (Literal['apply_shifts'])
- field fit: Literal['overhang'] = 'overhang'#
The strategy to use for blocks that overhang your total write roi.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field shift_threshold: float | None = None#
- field task_type: Literal['apply_shifts'] = 'apply_shifts'#
- pydantic model volara.blockwise.Argmax#
A blockwise task that performs an argmax operation on a given set of probabilities and writes the result to a semantic segmentation dataset.
Show JSON schema
{ "title": "Argmax", "description": "A blockwise task that performs an argmax operation on a given set of\nprobabilities and writes the result to a semantic segmentation dataset.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "argmax", "default": "argmax", "title": "Task Type", "type": "string" }, "probs_data": { "$ref": "#/$defs/Raw" }, "sem_data": { "$ref": "#/$defs/Labels" }, "combine_classes": { "anyOf": [ { "items": { "items": { "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Combine Classes" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "CloudVolumeWrapper": { "additionalProperties": false, "description": "Represents a volumetric dataset through Cloud Volume.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "cloudvolume", "default": "cloudvolume", "title": "Dataset Type", "type": "string" }, "mip": { "default": 0, "title": "Mip", "type": "integer" }, "timestamp": { "default": 1794424830, "title": "Timestamp", "type": "integer" }, "agglomerate": { "default": true, "title": "Agglomerate", "type": "boolean" }, "data_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Data Name" }, "fill_missing": { "default": false, "title": "Fill Missing", "type": "boolean" } }, "required": [ "store" ], "title": "CloudVolumeWrapper", "type": "object" }, "LSD": { "additionalProperties": false, "description": "Represents a dataset containing local shape descriptors.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "lsd", "default": "lsd", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "LSD", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Raw": { "additionalProperties": false, "description": "Represents a dataset containing raw intensities.\nHas support for sampling specific channels, normalizing\nwith provided scale and shifting, or reading in normalization\nbounds from OMERO metadata.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "raw", "default": "raw", "title": "Dataset Type", "type": "string" }, "ome_norm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ome Norm" }, "scale_shift": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Scale Shift" }, "stack": { "anyOf": [ { "discriminator": { "mapping": { "affs": "#/$defs/Affs", "cloudvolume": "#/$defs/CloudVolumeWrapper", "labels": "#/$defs/Labels", "lsd": "#/$defs/LSD", "mask": "#/$defs/MaskDataset", "raw": "#/$defs/Raw" }, "propertyName": "dataset_type" }, "oneOf": [ { "$ref": "#/$defs/Raw" }, { "$ref": "#/$defs/Affs" }, { "$ref": "#/$defs/LSD" }, { "$ref": "#/$defs/Labels" }, { "$ref": "#/$defs/MaskDataset" }, { "$ref": "#/$defs/CloudVolumeWrapper" } ] }, { "type": "null" } ], "default": null, "title": "Stack" } }, "required": [ "store" ], "title": "Raw", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "probs_data", "sem_data", "block_size" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])combine_classes (list[list[int]] | None)fit (Literal['shrink'])probs_data (volara.datasets.Raw)read_write_conflict (Literal[False])sem_data (volara.datasets.Labels)task_type (Literal['argmax'])
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
The block size with which to chunk our argmax task.
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field combine_classes: list[list[int]] | None = None#
A list of lists containing the ids to combine. All channels in combine_classes[i] will be summed into a new channel i before computing the argmax.
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field probs_data: Raw [Required]#
The dataset containing raw probabilities for which you want to compute the argmax.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field task_type: Literal['argmax'] = 'argmax'#
- pydantic model volara.blockwise.ComputeShift#
Show JSON schema
{ "title": "ComputeShift", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "overhang", "default": "overhang", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "compute_shift", "default": "compute_shift", "title": "Task Type", "type": "string" }, "intensities": { "$ref": "#/$defs/Raw" }, "shifts": { "$ref": "#/$defs/Raw" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" }, "context": { "items": { "type": "integer" }, "title": "Context", "type": "array" }, "mask": { "anyOf": [ { "$ref": "#/$defs/Labels" }, { "type": "null" } ], "default": null }, "overlap_ratio": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Overlap Ratio" }, "target": { "anyOf": [ { "$ref": "#/$defs/Raw" }, { "type": "null" } ], "default": null } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "CloudVolumeWrapper": { "additionalProperties": false, "description": "Represents a volumetric dataset through Cloud Volume.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "cloudvolume", "default": "cloudvolume", "title": "Dataset Type", "type": "string" }, "mip": { "default": 0, "title": "Mip", "type": "integer" }, "timestamp": { "default": 1794424830, "title": "Timestamp", "type": "integer" }, "agglomerate": { "default": true, "title": "Agglomerate", "type": "boolean" }, "data_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Data Name" }, "fill_missing": { "default": false, "title": "Fill Missing", "type": "boolean" } }, "required": [ "store" ], "title": "CloudVolumeWrapper", "type": "object" }, "LSD": { "additionalProperties": false, "description": "Represents a dataset containing local shape descriptors.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "lsd", "default": "lsd", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "LSD", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Raw": { "additionalProperties": false, "description": "Represents a dataset containing raw intensities.\nHas support for sampling specific channels, normalizing\nwith provided scale and shifting, or reading in normalization\nbounds from OMERO metadata.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "raw", "default": "raw", "title": "Dataset Type", "type": "string" }, "ome_norm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ome Norm" }, "scale_shift": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Scale Shift" }, "stack": { "anyOf": [ { "discriminator": { "mapping": { "affs": "#/$defs/Affs", "cloudvolume": "#/$defs/CloudVolumeWrapper", "labels": "#/$defs/Labels", "lsd": "#/$defs/LSD", "mask": "#/$defs/MaskDataset", "raw": "#/$defs/Raw" }, "propertyName": "dataset_type" }, "oneOf": [ { "$ref": "#/$defs/Raw" }, { "$ref": "#/$defs/Affs" }, { "$ref": "#/$defs/LSD" }, { "$ref": "#/$defs/Labels" }, { "$ref": "#/$defs/MaskDataset" }, { "$ref": "#/$defs/CloudVolumeWrapper" } ] }, { "type": "null" } ], "default": null, "title": "Stack" } }, "required": [ "store" ], "title": "Raw", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "intensities", "shifts", "block_size", "context" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])context (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])fit (Literal['overhang'])intensities (volara.datasets.Raw)mask (volara.datasets.Labels | None)overlap_ratio (float | None)read_write_conflict (Literal[False])shifts (volara.datasets.Raw)target (volara.datasets.Raw | None)task_type (Literal['compute_shift'])
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field context: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field fit: Literal['overhang'] = 'overhang'#
The strategy to use for blocks that overhang your total write roi.
- field overlap_ratio: float | None = None#
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field task_type: Literal['compute_shift'] = 'compute_shift'#
- pydantic model volara.blockwise.DistanceAgglom#
Distance based edge creation for fragment to segment agglomeration. In this context distance is defined as the distance between the embeddings of two fragments. Given some attributes saved or computable on the fragments we compute the distance between pairs of fragments and then save the edges with their costs. Because the distance is computed between embeddings, there is no spatial limit to the distance between fragments. This means that without a spatial constraint we would need to compute the distance between all pairs of fragments. To avoid this we can set a connection radius that will limit the euclidean distance between connectable fragments.
Show JSON schema
{ "title": "DistanceAgglom", "description": "Distance based edge creation for fragment to segment agglomeration.\nIn this context distance is defined as the distance between the embeddings\nof two fragments. Given some attributes saved or computable on the fragments\nwe compute the distance between pairs of fragments and then save the edges\nwith their costs.\nBecause the distance is computed between embeddings, there is no spatial limit\nto the distance between fragments. This means that without a spatial constraint\nwe would need to compute the distance between all pairs of fragments. To avoid\nthis we can set a connection radius that will limit the euclidean distance between\nconnectable fragments.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "distance-agglom", "default": "distance-agglom", "title": "Task Type", "type": "string" }, "storage": { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ], "title": "Storage" }, "frags_data": { "$ref": "#/$defs/Labels" }, "distance_keys": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Distance Keys" }, "background_intensities": { "anyOf": [ { "items": { "type": "number" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Background Intensities" }, "eps": { "default": 1e-08, "title": "Eps", "type": "number" }, "distance_threshold": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Distance Threshold" }, "distance_metric": { "default": "cosine", "enum": [ "euclidean", "cosine", "max" ], "title": "Distance Metric", "type": "string" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" }, "context": { "items": { "type": "integer" }, "title": "Context", "type": "array" } }, "$defs": { "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "PostgreSQL": { "additionalProperties": false, "description": "A PostgreSQL database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "postgresql", "default": "postgresql", "title": "Db Type", "type": "string" }, "host": { "default": "localhost", "title": "Host", "type": "string" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "name": { "default": "volara", "title": "Name", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" } }, "title": "PostgreSQL", "type": "object" }, "SQLite": { "additionalProperties": false, "description": "An SQLite database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "sqlite", "default": "sqlite", "title": "Db Type", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "SQLite", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "storage", "frags_data", "block_size", "context" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
background_intensities (list[float] | None)block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])context (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])distance_keys (list[str] | None)distance_metric (Literal['euclidean', 'cosine', 'max'])distance_threshold (float | None)eps (float)fit (Literal['shrink'])frags_data (volara.datasets.Labels)read_write_conflict (Literal[False])storage (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')])task_type (Literal['distance-agglom'])
- field background_intensities: list[float] | None = None#
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field context: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field distance_keys: list[str] | None = None#
- field distance_metric: Literal['euclidean', 'cosine', 'max'] = 'cosine'#
- field distance_threshold: float | None = None#
- field eps: float = 1e-08#
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field storage: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] [Required]#
Where to store the edges and or the final Look Up Table. If a Database is provided, it is assumed that each fragment in the fragments dataset has a node in the graph already saved.
- field task_type: Literal['distance-agglom'] = 'distance-agglom'#
- pydantic model volara.blockwise.ExtractFrags#
A task for extracting fragments from affinities. Internally it uses mutex watershed to agglomerate fragments.
Show JSON schema
{ "title": "ExtractFrags", "description": "A task for extracting fragments from affinities.\nInternally it uses mutex watershed to agglomerate fragments.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "extract-frags", "default": "extract-frags", "title": "Task Type", "type": "string" }, "db": { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ], "title": "Db" }, "affs_data": { "$ref": "#/$defs/Affs" }, "frags_data": { "$ref": "#/$defs/Labels" }, "mask_data": { "anyOf": [ { "$ref": "#/$defs/Raw" }, { "type": "null" } ], "default": null }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" }, "context": { "items": { "type": "integer" }, "title": "Context", "type": "array" }, "bias": { "items": { "type": "number" }, "title": "Bias", "type": "array" }, "strides": { "anyOf": [ { "items": { "items": { "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Strides" }, "sigma": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Sigma" }, "noise_eps": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Noise Eps" }, "filter_fragments": { "default": 0.0, "title": "Filter Fragments", "type": "number" }, "remove_debris": { "default": 0, "title": "Remove Debris", "type": "integer" }, "min_extent": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Min Extent" }, "randomized_strides": { "default": false, "title": "Randomized Strides", "type": "boolean" }, "min_seed_distance": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Min Seed Distance" }, "adaptive_seed_spacing": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Adaptive Seed Spacing" }, "boundary_mask_offsets": { "anyOf": [ { "enum": [ "direct", "all" ], "type": "string" }, { "items": { "type": "integer" }, "type": "array" } ], "default": "direct", "title": "Boundary Mask Offsets" }, "seed_eps": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Seed Eps" }, "max_seed_decay_distance": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Max Seed Decay Distance" }, "voronoi": { "anyOf": [ { "enum": [ "geodesic", "euclidean" ], "type": "string" }, { "type": "null" } ], "default": null, "title": "Voronoi" }, "bulk_write": { "default": false, "title": "Bulk Write", "type": "boolean" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "CloudVolumeWrapper": { "additionalProperties": false, "description": "Represents a volumetric dataset through Cloud Volume.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "cloudvolume", "default": "cloudvolume", "title": "Dataset Type", "type": "string" }, "mip": { "default": 0, "title": "Mip", "type": "integer" }, "timestamp": { "default": 1794424830, "title": "Timestamp", "type": "integer" }, "agglomerate": { "default": true, "title": "Agglomerate", "type": "boolean" }, "data_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Data Name" }, "fill_missing": { "default": false, "title": "Fill Missing", "type": "boolean" } }, "required": [ "store" ], "title": "CloudVolumeWrapper", "type": "object" }, "LSD": { "additionalProperties": false, "description": "Represents a dataset containing local shape descriptors.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "lsd", "default": "lsd", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "LSD", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "PostgreSQL": { "additionalProperties": false, "description": "A PostgreSQL database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "postgresql", "default": "postgresql", "title": "Db Type", "type": "string" }, "host": { "default": "localhost", "title": "Host", "type": "string" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "name": { "default": "volara", "title": "Name", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" } }, "title": "PostgreSQL", "type": "object" }, "Raw": { "additionalProperties": false, "description": "Represents a dataset containing raw intensities.\nHas support for sampling specific channels, normalizing\nwith provided scale and shifting, or reading in normalization\nbounds from OMERO metadata.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "raw", "default": "raw", "title": "Dataset Type", "type": "string" }, "ome_norm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ome Norm" }, "scale_shift": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Scale Shift" }, "stack": { "anyOf": [ { "discriminator": { "mapping": { "affs": "#/$defs/Affs", "cloudvolume": "#/$defs/CloudVolumeWrapper", "labels": "#/$defs/Labels", "lsd": "#/$defs/LSD", "mask": "#/$defs/MaskDataset", "raw": "#/$defs/Raw" }, "propertyName": "dataset_type" }, "oneOf": [ { "$ref": "#/$defs/Raw" }, { "$ref": "#/$defs/Affs" }, { "$ref": "#/$defs/LSD" }, { "$ref": "#/$defs/Labels" }, { "$ref": "#/$defs/MaskDataset" }, { "$ref": "#/$defs/CloudVolumeWrapper" } ] }, { "type": "null" } ], "default": null, "title": "Stack" } }, "required": [ "store" ], "title": "Raw", "type": "object" }, "SQLite": { "additionalProperties": false, "description": "An SQLite database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "sqlite", "default": "sqlite", "title": "Db Type", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "SQLite", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "db", "affs_data", "frags_data", "block_size", "context", "bias" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
adaptive_seed_spacing (float | None)affs_data (volara.datasets.Affs)bias (list[float])block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])boundary_mask_offsets (Literal['direct', 'all'] | list[int])bulk_write (bool)context (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])db (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')])filter_fragments (float)fit (Literal['shrink'])frags_data (volara.datasets.Labels)mask_data (volara.datasets.Raw | None)max_seed_decay_distance (int | None)min_extent (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation] | None)min_seed_distance (int | None)noise_eps (float | None)randomized_strides (bool)read_write_conflict (Literal[False])remove_debris (int)seed_eps (float | None)sigma (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation] | None)strides (list[Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation]] | None)task_type (Literal['extract-frags'])voronoi (Literal['geodesic', 'euclidean'] | None)
- Validators:
_boundary_mask_offsets_are_usable»all fields_min_extent_matches_dims»all fields_one_seed_spacing_rule»all fields
- field adaptive_seed_spacing: float | None = None#
Seed with a spacing that follows the local object size: each candidate’s suppression radius is this multiple of its own distance to the boundary, capped at the block context. Candidates sit on the medial axis, where that distance is the local radius, so 2.0 is roughly one seed per local diameter. Lower is finer everywhere. Mutually exclusive with min_seed_distance.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field affs_data: Affs [Required]#
The affinities dataset that we will use to extract fragments.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field bias: list[float] [Required]#
The merge/split bias for the affinities. This should be a vector of length equal to the size of the neighborhood with one bias per offset. This allows you to have a merge preferring bias for short range affinites and a split preferring bias for long range affinities.
Example: Assuming you trained affs [(0, 1), (1, 0), (0, 4), (4, 0)] for a 2D dataset, you can set the bias to [-0.2, -0.2, -0.8, -0.8]. This will bias you towards merging on short range affinities and splitting on long range affinities which has been shown to work well.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field boundary_mask_offsets: Literal['direct', 'all'] | list[int] = 'direct'#
Which affinity offsets are averaged into the boundary mask that seeds are placed in: “direct” for the unit offsets, “all” for the whole neighborhood, or explicit indices into it. Including long range offsets erodes each object by roughly the offset size, which drops objects thinner than those offsets out of the mask entirely, leaving them unseeded.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field bulk_write: bool = False#
Whether to bulk-write to database (false by default). This removes/rebuilds indexes, and sets other useful flags for writing large amounts of data quickly, which can be useful for large runs to prevent database bottlenecks.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field context: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field db: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] [Required]#
The database into which we will store node centers along with statistics such as fragment size, mean intensity, etc.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field filter_fragments: float = 0.0#
The minimum average affinity value for a fragment to be considered valid. If the average affinity value is below this threshold the fragment will be removed.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field frags_data: Labels [Required]#
The output dataset that will contain the extracted fragments.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field mask_data: Raw | None = None#
An optional mask that will be used to ignore some affinities.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field max_seed_decay_distance: int | None = None#
If using seeds and seed_eps is set, optionally cap the seed distance transform used for affinity decay. This prevents the decay from growing without bound deep inside large objects, which can otherwise lead to unlabeled (0) interiors. If None, no cap is applied.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field min_extent: Annotated[Coordinate, _CoordinatePydanticAnnotation] | None = None#
If set, remove any fragment whose bounding box spans fewer voxels than this along an axis, one value per axis. A resolution statement rather than a sizing knob: at an anisotropic voxel size a fragment one section thick cannot represent a real structure, and low-certainty pockets come out of mutex watershed as stacks of exactly such single-section plates - confident in plane, uncertain across sections - so (2, 1, 1) removes the plates while leaving anything with genuine extent alone. filter_fragments cannot catch these: it averages the direct offsets, and the confident in-plane affinities hide the missing cross-section support. Extents are measured on the read block, before cropping, so a fragment that merely pokes into a block face keeps the extent its context gives it.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field min_seed_distance: int | None = None#
Seed with one spacing everywhere: the size of the maximum filter footprint computed on the boundary distances, in voxels. Mutually exclusive with adaptive_seed_spacing; set neither to skip seeding entirely.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field noise_eps: float | None = None#
The amplitude of the random noise to add to the affinities before watershed. This also helps avoid streak like fragment artifacts from processing affinities in a fifo order.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field randomized_strides: bool = False#
If using strides, you may want to switch from a grided stride to a random probability of filtering out an affinity. This can help avoid grid artifacts in the fragments.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field remove_debris: int = 0#
The minimum size of a fragment to be considered valid. If the fragment is smaller than this value it will be removed.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field seed_eps: float | None = None#
If using seeds, this will decay the affs based on distance from the seeds. The seed_eps is the scale to apply to the seed distance transform which is then subtracted from the shift. This is useful if increased fragmentation of the supervoxels is desired.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field sigma: Annotated[Coordinate, _CoordinatePydanticAnnotation] | None = None#
The amplitude of the smoothing kernel to apply to the affinities before watershed. This can help agglomerate fragments from the inside out to avoid a small merge error causing a large fragment to split in half.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field strides: list[Annotated[Coordinate, _CoordinatePydanticAnnotation]] | None = None#
The strides to use for each affinity offset in the mutex watershed algorithm. If you have long range affinities it can be heplful to ignore some percentage of them to avoid excessive splits, so you may want to use only every other voxel in the z direction for example.
Example: Assuming you trained affs [(0, 1), (1, 0), (0, 4), (4, 0)] for a 2D dataset, you can set the strides to [(1, 1), (1, 1), (2, 2), (2, 2)]. This will result in only 1 in every 4 long range affinities being used in the mutex watershed algorithm resulting in fewer splits (assuming you biased long range affinities towards splitting).
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field task_type: Literal['extract-frags'] = 'extract-frags'#
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- field voronoi: Literal['geodesic', 'euclidean'] | None = None#
If using seeds, split every unit-offset affinity whose two voxels belong to different seeds, so fragment boundaries land on the surface where two seeds’ territories meet rather than wherever the affinity field happens to dip.
“geodesic” grows territory by flooding the boundary distances within the mask, so a seed claims only tissue it connects to and the seam is a cross section, settling at a constriction where there is one. “euclidean” takes the nearest seed in space, which is cheaper but lets a seed claim tissue it is not connected to. Long range offsets are never cut, each spanning many territories, so one can still merge across a seam.
- Validated by:
_boundary_mask_offsets_are_usable_min_extent_matches_dims_one_seed_spacing_rule
- pydantic model volara.blockwise.GraphMWS#
Graph based execution of the MWS algorithm. Currently only supports executing in memory. The full graph for the given ROI is read into memory and then we run the mutex watershed algorithm on the full graph to get a globally optimal look up table.
Show JSON schema
{ "title": "GraphMWS", "description": "Graph based execution of the MWS algorithm.\nCurrently only supports executing in memory. The full graph for the given ROI\nis read into memory and then we run the mutex watershed algorithm on the full\ngraph to get a globally optimal look up table.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "default": 86400, "title": "Block Timeout", "type": "number" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "graph-mws", "default": "graph-mws", "title": "Task Type", "type": "string" }, "db": { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ], "title": "Db" }, "lut": { "$ref": "#/$defs/LUT" }, "starting_lut": { "anyOf": [ { "$ref": "#/$defs/LUT" }, { "type": "null" } ], "default": null }, "weights": { "additionalProperties": { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, "title": "Weights", "type": "object" }, "edge_per_attr": { "default": true, "title": "Edge Per Attr", "type": "boolean" }, "mean_attrs": { "anyOf": [ { "additionalProperties": { "type": "string" }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Mean Attrs" }, "out_db": { "anyOf": [ { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ] }, { "type": "null" } ], "default": null, "title": "Out Db" }, "bounded_read": { "default": true, "title": "Bounded Read", "type": "boolean" } }, "$defs": { "LUT": { "additionalProperties": false, "description": "A class for defining look up tables", "properties": { "path": { "title": "Path", "type": "string" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" } }, "required": [ "path" ], "title": "LUT", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "PostgreSQL": { "additionalProperties": false, "description": "A PostgreSQL database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "postgresql", "default": "postgresql", "title": "Db Type", "type": "string" }, "host": { "default": "localhost", "title": "Host", "type": "string" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "name": { "default": "volara", "title": "Name", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" } }, "title": "PostgreSQL", "type": "object" }, "SQLite": { "additionalProperties": false, "description": "An SQLite database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "sqlite", "default": "sqlite", "title": "Db Type", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "SQLite", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "db", "lut", "weights" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
block_timeout (float)bounded_read (bool)db (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')])edge_per_attr (bool)fit (Literal['shrink'])lut (volara.lut.LUT)mean_attrs (dict[str, str] | None)out_db (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] | None)read_write_conflict (Literal[False])starting_lut (volara.lut.LUT | None)task_type (Literal['graph-mws'])weights (dict[str, tuple[float, float]])
- field block_timeout: float = 86400#
This task agglomerates the ENTIRE graph in one global block, which on large datasets legitimately runs for hours – daisy’s default per-block timeout (600s) would reclaim and retry it mid-run. 24h keeps a genuinely hung run bounded without tripping on real workloads. Override with a smaller value for small graphs if you want faster reclaim of a stuck run.
- field bounded_read: bool = True#
Reading from the db can be made more efficient by not doing a spatial query and assuming we want all nodes and edges. If you don’t want to process a sub volume of the graph setting this to false will speed up the read.
- field db: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] [Required]#
- field edge_per_attr: bool = True#
Whether or not to create a separate edge for each attribute in the weights. If False, the sum of all the weighted attributes will be used as the only edge weight.
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field lut: LUT [Required]#
The Look Up Table that will be saved on completion of this task.
- field mean_attrs: dict[str, str] | None = None#
A dictionary of attributes to compute the mean of for each segment. Given mean_attrs = {“attr1”: “out_attr1”} and nodes n_i in a segment s we will set s.out_attr1 = sum(n_i.attr1 * n_i.size) / sum(n_i.size).
- field out_db: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] | None = None#
The db in which to store segment nodes and their attributes. Must not be None if mean_attrs is not None.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field starting_lut: LUT | None = None#
An optional Look Up Table that provides a set of merged fragments that must be preserved in the final Look Up Table.
- field task_type: Literal['graph-mws'] = 'graph-mws'#
- field weights: dict[str, tuple[float, float]] [Required]#
A dictionary of edge attributes and their weight and bias. These will be used to compute the edge weights for the mutex watershed algorithm. Positive edges will result in fragments merging, negative edges will result in splitting and edges will be processed in order of high to low magnitude. Each attribute will have a final score of w * edge_data[attr] + b for every attr, (w, b) in weights.items() If an attribute is not present in the edge data it will be skipped.
- pydantic model volara.blockwise.Relabel#
A task for blockwise relabelling of arrays using a lookup table from fragment to segment IDs.
Show JSON schema
{ "title": "Relabel", "description": "A task for blockwise relabelling of arrays using a lookup table from fragment\nto segment IDs.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "relabel", "default": "relabel", "title": "Task Type", "type": "string" }, "frags_data": { "$ref": "#/$defs/Labels" }, "seg_data": { "$ref": "#/$defs/Labels" }, "lut": { "$ref": "#/$defs/LUT" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" } }, "$defs": { "LUT": { "additionalProperties": false, "description": "A class for defining look up tables", "properties": { "path": { "title": "Path", "type": "string" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" } }, "required": [ "path" ], "title": "LUT", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "frags_data", "seg_data", "lut", "block_size" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])fit (Literal['shrink'])frags_data (volara.datasets.Labels)lut (volara.lut.LUT)read_write_conflict (Literal[False])seg_data (volara.datasets.Labels)task_type (Literal['relabel'])
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field lut: LUT [Required]#
The path to the lookup table (LUT) that maps fragment IDs to segment IDs.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field seg_data: Labels [Required]#
The segments dataset to which we write the relabeled segment IDs.
- field task_type: Literal['relabel'] = 'relabel'#
- pydantic model volara.blockwise.SeededExtractFrags#
Extract fragments from affinities using a set of skeletons as a supervising signal. Any voxel that intersects with a node placed on a skeleton is guaranteed to be assigned the label of the skeleton it intersects with. The affinities are used to fill out the rest of the segment to get a full volume representation of your skeletons.
Any fragment that does not intersect with a skeleton is discarded.
Show JSON schema
{ "title": "SeededExtractFrags", "description": "Extract fragments from affinities using a set of skeletons as a supervising signal.\nAny voxel that intersects with a node placed on a skeleton is guaranteed to be assigned\nthe label of the skeleton it intersects with. The affinities are used to fill out\nthe rest of the segment to get a full volume representation of your skeletons.\n\nAny fragment that does not intersect with a skeleton is discarded.", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "seeded-extract-frags", "default": "seeded-extract-frags", "title": "Task Type", "type": "string" }, "affs_data": { "$ref": "#/$defs/Affs" }, "segs_data": { "$ref": "#/$defs/Labels" }, "mask_data": { "anyOf": [ { "$ref": "#/$defs/Labels" }, { "type": "null" } ], "default": null }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" }, "context": { "items": { "type": "integer" }, "title": "Context", "type": "array" }, "bias": { "items": { "type": "number" }, "title": "Bias", "type": "array" }, "strides": { "anyOf": [ { "items": { "items": { "type": "integer" }, "type": "array" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Strides" }, "graph_db": { "discriminator": { "mapping": { "postgresql": "#/$defs/PostgreSQL", "sqlite": "#/$defs/SQLite" }, "propertyName": "db_type" }, "oneOf": [ { "$ref": "#/$defs/PostgreSQL" }, { "$ref": "#/$defs/SQLite" } ], "title": "Graph Db" }, "randomized_strides": { "default": false, "title": "Randomized Strides", "type": "boolean" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "PostgreSQL": { "additionalProperties": false, "description": "A PostgreSQL database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "postgresql", "default": "postgresql", "title": "Db Type", "type": "string" }, "host": { "default": "localhost", "title": "Host", "type": "string" }, "port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Port" }, "name": { "default": "volara", "title": "Name", "type": "string" }, "user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "User" }, "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Password" } }, "title": "PostgreSQL", "type": "object" }, "SQLite": { "additionalProperties": false, "description": "An SQLite database for storing and retrieving graph data.", "properties": { "node_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Node Attrs" }, "edge_attrs": { "anyOf": [ { "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "object" }, { "type": "null" } ], "default": null, "title": "Edge Attrs" }, "ndim": { "default": 3, "title": "Ndim", "type": "integer" }, "db_type": { "const": "sqlite", "default": "sqlite", "title": "Db Type", "type": "string" }, "path": { "title": "Path", "type": "string" } }, "required": [ "path" ], "title": "SQLite", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "affs_data", "segs_data", "block_size", "context", "bias", "graph_db" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
affs_data (volara.datasets.Affs)bias (list[float])block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])context (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])fit (Literal['shrink'])graph_db (Annotated[volara.dbs.PostgreSQL | volara.dbs.SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')])mask_data (volara.datasets.Labels | None)randomized_strides (bool)read_write_conflict (Literal[False])segs_data (volara.datasets.Labels)strides (list[Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation]] | None)task_type (Literal['seeded-extract-frags'])
- field affs_data: Affs [Required]#
The affinities dataset that will be used to expand the skeletons to full segments.
- field bias: list[float] [Required]#
The bias terms to be used for each offset in the affinities neighborhoood.
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field context: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field graph_db: Annotated[PostgreSQL | SQLite, FieldInfo(annotation=NoneType, required=True, discriminator='db_type')] [Required]#
The graph database containing the skeletons to use as a supervising signale.
- field randomized_strides: bool = False#
Whether or not to convert the strides from a grid like filter to a random probability of filtering out each affinity edge.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field segs_data: Labels [Required]#
The segmentations dataset that will contain the final segmentations.
- field strides: list[Annotated[Coordinate, _CoordinatePydanticAnnotation]] | None = None#
The strides with which to filter each offset in the affinities neighborhood.
- field task_type: Literal['seeded-extract-frags'] = 'seeded-extract-frags'#
- pydantic model volara.blockwise.Threshold#
Blockwise threshold an array
Show JSON schema
{ "title": "Threshold", "description": "Blockwise threshold an array", "type": "object", "properties": { "roi": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "items": { "type": "integer" }, "type": "array" }, { "items": { "type": "integer" }, "type": "array" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Roi" }, "num_workers": { "default": 1, "title": "Num Workers", "type": "integer" }, "num_cache_workers": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Num Cache Workers" }, "worker_config": { "anyOf": [ { "$ref": "#/$defs/Worker" }, { "type": "null" } ], "default": null }, "fit": { "const": "shrink", "default": "shrink", "title": "Fit", "type": "string" }, "read_write_conflict": { "const": false, "default": false, "title": "Read Write Conflict", "type": "boolean" }, "resource_tracking": { "default": true, "title": "Resource Tracking", "type": "boolean" }, "block_timeout": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "default": null, "title": "Block Timeout" }, "array_scheduler": { "anyOf": [ { "enum": [ "single-threaded", "synchronous", "threads", "processes" ], "type": "string" }, { "type": "null" } ], "default": "single-threaded", "title": "Array Scheduler" }, "skip_mask": { "anyOf": [ { "$ref": "#/$defs/MaskDataset" }, { "type": "null" } ], "default": null }, "task_type": { "const": "threshold", "default": "threshold", "title": "Task Type", "type": "string" }, "in_data": { "$ref": "#/$defs/Raw" }, "mask": { "$ref": "#/$defs/Labels" }, "threshold": { "title": "Threshold", "type": "number" }, "block_size": { "items": { "type": "integer" }, "title": "Block Size", "type": "array" } }, "$defs": { "Affs": { "additionalProperties": false, "description": "Represents a dataset containing affinities.\nRequires the inclusion of the neighborhood for these\naffinities.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "affs", "default": "affs", "title": "Dataset Type", "type": "string" }, "neighborhood": { "items": { "items": { "type": "integer" }, "type": "array" }, "title": "Neighborhood", "type": "array" } }, "required": [ "store" ], "title": "Affs", "type": "object" }, "CloudVolumeWrapper": { "additionalProperties": false, "description": "Represents a volumetric dataset through Cloud Volume.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "cloudvolume", "default": "cloudvolume", "title": "Dataset Type", "type": "string" }, "mip": { "default": 0, "title": "Mip", "type": "integer" }, "timestamp": { "default": 1794424830, "title": "Timestamp", "type": "integer" }, "agglomerate": { "default": true, "title": "Agglomerate", "type": "boolean" }, "data_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Data Name" }, "fill_missing": { "default": false, "title": "Fill Missing", "type": "boolean" } }, "required": [ "store" ], "title": "CloudVolumeWrapper", "type": "object" }, "LSD": { "additionalProperties": false, "description": "Represents a dataset containing local shape descriptors.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "lsd", "default": "lsd", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "LSD", "type": "object" }, "Labels": { "additionalProperties": false, "description": "Represents an integer label dataset.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "labels", "default": "labels", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "Labels", "type": "object" }, "MaskDataset": { "additionalProperties": false, "description": "A per-block skip mask for a blockwise task.\n\nPoints to a zarr array in the task's *block-grid* space: one element per\nblock, not per voxel. Any nonzero value means \"skip this block\", zero means\n\"run it\". The array must have one cell per block of the task\n(:attr:`BlockwiseTask.block_grid_shape`), and cell ``(0, 0, ...)`` is the\nfirst block of the task's ``write_roi`` whatever the context.\n\nHanded to :attr:`BlockwiseTask.skip_mask`, it is passed straight to daisy as\n``Task(skip_mask=...)``: masked blocks are reported as skipped and release\ntheir downstream dependencies, but are never recorded as done, so the mask\napplies to the run it is passed to. A later run with a narrower mask (or\nnone) runs the blocks it no longer covers, while blocks that completed stay\ndone. This is the generic form of the surface-band skip: a thin predicted\nsurface only touches a few blocks, so the rest can be skipped up front.\n\nGrid-space, not voxel-space: the inherited voxel-metadata fields are unused\nand the array may have any integer or bool dtype; daisy casts it. Read it\nlike any other dataset, with :meth:`array`. How the mask is built is left to\nthe caller.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "mask", "default": "mask", "title": "Dataset Type", "type": "string" } }, "required": [ "store" ], "title": "MaskDataset", "type": "object" }, "Raw": { "additionalProperties": false, "description": "Represents a dataset containing raw intensities.\nHas support for sampling specific channels, normalizing\nwith provided scale and shifting, or reading in normalization\nbounds from OMERO metadata.", "properties": { "store": { "title": "Store", "type": "string" }, "voxel_size": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Voxel Size" }, "offset": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Offset" }, "axis_names": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Axis Names" }, "units": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Units" }, "writable": { "default": true, "title": "Writable", "type": "boolean" }, "ops": { "anyOf": [ { "items": { "description": "A python callable, serialized with cloudpickle and base64-encoded. Deserializing executes arbitrary code: only load configs you trust.", "format": "base64-cloudpickle", "type": "string" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Ops" }, "flip": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Flip" }, "channels": { "anyOf": [ { "items": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "integer" } ] }, "type": "array" }, { "type": "integer" }, { "type": "null" } ], "default": null, "title": "Channels" }, "zarr_kwargs": { "additionalProperties": true, "title": "Zarr Kwargs", "type": "object" }, "sharding": { "default": true, "title": "Sharding", "type": "boolean" }, "inner_chunk_shape": { "anyOf": [ { "items": { "type": "integer" }, "type": "array" }, { "type": "null" } ], "default": null, "title": "Inner Chunk Shape" }, "storage_options": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "default": null, "title": "Storage Options" }, "dataset_type": { "const": "raw", "default": "raw", "title": "Dataset Type", "type": "string" }, "ome_norm": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Ome Norm" }, "scale_shift": { "anyOf": [ { "maxItems": 2, "minItems": 2, "prefixItems": [ { "type": "number" }, { "type": "number" } ], "type": "array" }, { "type": "null" } ], "default": null, "title": "Scale Shift" }, "stack": { "anyOf": [ { "discriminator": { "mapping": { "affs": "#/$defs/Affs", "cloudvolume": "#/$defs/CloudVolumeWrapper", "labels": "#/$defs/Labels", "lsd": "#/$defs/LSD", "mask": "#/$defs/MaskDataset", "raw": "#/$defs/Raw" }, "propertyName": "dataset_type" }, "oneOf": [ { "$ref": "#/$defs/Raw" }, { "$ref": "#/$defs/Affs" }, { "$ref": "#/$defs/LSD" }, { "$ref": "#/$defs/Labels" }, { "$ref": "#/$defs/MaskDataset" }, { "$ref": "#/$defs/CloudVolumeWrapper" } ] }, { "type": "null" } ], "default": null, "title": "Stack" } }, "required": [ "store" ], "title": "Raw", "type": "object" }, "Worker": { "additionalProperties": false, "properties": { "queue": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "title": "Queue" }, "num_gpus": { "default": 0, "title": "Num Gpus", "type": "integer" }, "num_cpus": { "default": 1, "title": "Num Cpus", "type": "integer" } }, "title": "Worker", "type": "object" } }, "additionalProperties": false, "required": [ "in_data", "mask", "threshold", "block_size" ] }
- Config:
extra: str = forbid
arbitrary_types_allowed: bool = True
- Fields:
block_size (Annotated[funlib.geometry.coordinate.Coordinate, volara.utils._CoordinatePydanticAnnotation])fit (Literal['shrink'])in_data (volara.datasets.Raw)mask (volara.datasets.Labels)read_write_conflict (Literal[False])task_type (Literal['threshold'])threshold (float)
- field block_size: Annotated[Coordinate, _CoordinatePydanticAnnotation] [Required]#
- Constraints:
__module__ = volara.utils
__get_pydantic_core_schema__ = <bound method _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ of <class ‘volara.utils._CoordinatePydanticAnnotation’>>
__dict__ = {‘__module__’: ‘volara.utils’, ‘__get_pydantic_core_schema__’: <classmethod(<function _CoordinatePydanticAnnotation.__get_pydantic_core_schema__ at 0x79efdb3f8a40>)>, ‘__dict__’: <attribute ‘__dict__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__weakref__’: <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>, ‘__doc__’: None}
__weakref__ = <attribute ‘__weakref__’ of ‘_CoordinatePydanticAnnotation’ objects>
- field fit: Literal['shrink'] = 'shrink'#
The strategy to use for blocks that overhang your total write roi.
- field read_write_conflict: Literal[False] = False#
Whether blocks have read/write dependencies on neighborhing blocks requiring a specific ordering to the block processing to compute a seamless result.
- field task_type: Literal['threshold'] = 'threshold'#
- field threshold: float [Required]#
The threshold value to apply to your dataset.