neu_vol.ops.maskvalue¶
Replace label values with background, in a volume that already has them.
For a segmentation whose background is not 0 (a tool numbering labels from 0 makes it 1):
meshed, background becomes one enormous body, and an all-background block of 1s is not
all-fill, so it is stored, after which “which chunks exist” no longer says where the data
is. The better fix is at ingest (--background on write/to-hdf5/convert);
this op is for data that has already landed.
Both destinations restore the sparsity: writing zeros over a stored chunk deletes the
object. --out is still preferred, so the original stays as the record of what was
annotated. Single-scale: run neu-vol downsample --start-level <level> afterwards.
Attributes¶
Functions¶
|
Carry out a |
|
Plan and apply in one call. See |
|
What |
Module Contents¶
- neu_vol.ops.maskvalue.apply_mask_values(plan: dict, *, dry_run: bool = False, overwrite: bool = False, max_bytes: int = DEFAULT_BLOCK_BYTES) dict¶
Carry out a
plan_mask_values(), returning what it changed.Counts are exact:
replacedof 0 means nothing matched, andalready_backgroundabove 0 means two labels have just become one.
- neu_vol.ops.maskvalue.mask_values(volume: str, values: Sequence[int], *, out: str | None = None, in_place: bool = False, level: int = 0, to: int = 0, dry_run: bool = False, overwrite: bool = False) dict¶
Plan and apply in one call. See
plan_mask_values().
- neu_vol.ops.maskvalue.plan_mask_values(volume: str, values: Sequence[int], *, out: str | None = None, in_place: bool = False, level: int = 0, to: int = 0) dict¶
What
apply_mask_values()would do. Reads metadata and occupancy only.Exactly one of
out/in_place, as inrelabel.
- neu_vol.ops.maskvalue.DEFAULT_BLOCK_BYTES = 2147483648¶
- neu_vol.ops.maskvalue.logger¶