neu_morpho.config

Configuration for the block-first meshing pipeline and its output locations.

Meshing is block-first, two-stage: stage 1 meshes each non-empty block (all/allowlisted labels at once) into per-(body, block) fragments; stage 2 concatenates + stitches each body’s fragments into a multi-resolution mesh. No whole-object binary mask is ever built.

Classes

MeshConfig

Tunables for block-first meshing.

OutputConfig

Where results go — data and bookkeeping are separate destinations.

Module Contents

class neu_morpho.config.MeshConfig

Tunables for block-first meshing.

block_shape: tuple[int, int, int] = (256, 256, 256)
decimation_fraction: float = 0.1
draco_quantization_bits: int = 16
fragment_format: str = 'drc'
lod_decimation_factor: float = 2.0
mesh_scale: int = 2
min_segment_voxels: int = 0
num_lods: int = 3
sharded: bool = False
smoothing_iterations: int = 0
class neu_morpho.config.OutputConfig

Where results go — data and bookkeeping are separate destinations.

dst is the published precomputed volume and may be an s3:// URL; work_dir must be a filesystem path: it holds a sqlite DB, appended JSONL manifests and the stage-1 fragment stores.

A manifest can therefore outlive the data it describes, and a resumed run would skip every task having written nothing. Every stage refuses that (ops.manifest.check_manifest_matches_output); anything else writing to dst under a manifest must make the same check.

check_work_dir_is_local() → None

Fail early if work_dir is remote — sqlite and append cannot use it.

mesh_out() → str

Where mesh fragments go: a subdirectory of the volume.

skeleton_out() → str

Where skeleton blobs go: a subdirectory of the volume.

volume_dir() → str

The precomputed volume root — what you point neuroglancer at.

work(*parts: str) → str

Join parts onto the POSIX work directory.

chunked_dir: str = ''
dst: str = ''
extra: dict
mesh_dir: str = 'mesh'
progress_path: str | None = None
skel_chunked_dir: str = ''
skeleton_dir: str = 'skeleton'
work_dir: str = ''